O'Reilly logo

Learning pandas - Second Edition by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The pandas DataFrame

A pandas Series can only have a single value associated with each index label. To have multiple values per index label we can use a data frame. A data frame represents one or more Series objects aligned by index label. Each series will be a column in the data frame, and each column can have an associated name.

In a way, a data frame is analogous to a relational database table in that it contains one or more columns of data of heterogeneous types (but a single type for all items in each respective column).

The following creates a DataFrame object with two columns and uses the temperature Series objects:

The resulting data frame ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required