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

Creating DataFrame objects

There are a number of ways to create a data frame. A data frame can be created from either a single or multi-dimensional set of data. The techniques that we will examine are as follows:

  • Using the results of NumPy functions
  • Using data from a Python dictionary consisting of lists or pandas Series objects
  • Using data from a CSV file

While examining each of these we will also examine how to specify column names, demonstrate how alignment is performed during initialization, and see how to determine the dimensions of a 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