Chapter 11. Working with: elephants dataframes: Tabular Data

Image

Sometimes it’s as if all the world’s data wants to be in a table.

Tabular data is everywhere. The swimming world records from the previous chapter are tabular data. If you’re old enough to remember phone books, the data is tabular. Bank statements, invoices, spreadsheets: you guessed it, all tabular data. In this short chapter, you’ll learn a bit about one of the most popular tabular data analysis libraries in Python: pandas. You’ll only skim the surface of what pandas can do, but you’ll learn enough to be able to exploit the most-used pandas data structure, the dataframe, when you’re next faced with processing a chunk of tabular data.

The elephant in the room… or is it a panda?

The Head First Coders sent over their top code reviewer who took a quick look at the code you created to scrape the swimming world records from Wikipedia. They only had one thing to say…

Image
Image

It’s not that our code doesn’t work. It does.

And the Coach is more than happy, and rightly so.

When we point this out, Sanjita continues to shake her head. When we further point out that we’ve never used pandas, Sanjita’s frown turns into a smile, and ...

Get Head First Python, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.