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

Reading a CSV file into a DataFrame

The data in data/MSFT.CSV is perfect to read into DataFrame. All its data is complete and has column names in the first row. All that we need to do to read this data into DataFrame is to use the pandas pd.read_csv() function:

Wow, that was easy! Pandas has realized that the first line of the file contains the names of the columns and bulk read in the data to DataFrame.

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