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 time-series with specific frequencies

Time-series data can be created on intervals other than daily frequency. Different frequencies can be generated with pd.date_range() by utilizing the freq parameter. This parameter defaults to a value of 'D' which represents daily frequency.

To demonstrate alternative frequencies, the following creates a DatetimeIndex with 1-minute intervals by specifying freq='T':

This time-series allows us to slice at a finer resolution. The following slices at the minute level:

The following table lists the ...

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