O'Reilly logo

Mastering Python Data Analysis by Luiz Felipe Martins, Magnus Vilhelm Persson

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

Pandas and time series data

In Pandas, there is a certain data type for time series data. This is a normal Pandas DataFrame or Series where the index is a column of the datetime objects. It has to be this kind of object for Pandas to recognize it as dates and for it to understand what to do with the dates. To show you how it works, let us read in a time series dataset.

The first data that we are reading in is the mean measured daily temperature at Fisher River near Dallas, USA from 1st January, 1988 to 31st December, 1991. The data can be downloaded from DataMarket in several formats ( https://datamarket.com/data/set/235d/ ), and it can also be acquired from http://ftp.uni-bayreuth.de/math/statlib/datasets/hipel-mcleod . Here, I have the data in ...

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