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 charts

One of the most common data visualizations is of time-series data. Visualizing a time series in pandas is as simple as calling .plot() on a DataFrame or Series object that models a time series.

The following example demonstrates creating a time series that represents a random walk of values over time, akin to the movements in the price of a stock:

The .plot() method on pandas objects is a wrapper function around the matplotlib library's plot() function. It makes plots of pandas data very easy to create as its implementation is coded to know how to render many visualizations based on the underlying data. It handles ...

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