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

Plotting volume-series data

Volume data can be plotted using bar charts. We first need to get the volume data, which can be done using the pivot_tickers_to_columns() function created earlier:

We can now use this data to plot a bar chart. The following plots the volume for MSFT:

A common type of financial graph plots a stock volume relative to its closing price. The following sample creates this type of visualization:

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