Skip to Content
Python: Data Analytics and Visualization
book

Python: Data Analytics and Visualization

by Phuong Vo.T.H, Martin Czygan, Ashish Kumar, Kirthi Raman
March 2017
Beginner to intermediate
866 pages
18h 4m
English
Packt Publishing
Content preview from Python: Data Analytics and Visualization

Plotting functions with Pandas

We have covered most of the important components in a plot figure using matplotlib. In this section, we will introduce another powerful plotting method for directly creating standard visualization from Pandas data objects that are often used to manipulate data.

For Series or DataFrame objects in Pandas, most plotting types are supported, such as line, bar, box, histogram, and scatter plots, and pie charts. To select a plot type, we use the kind argument of the plot function. With no kind of plot specified, the plot function will generate a line style visualization by default , as in the following example:

>>> s = pd.Series(np.random.normal(10, 8, 20))
>>> s.plot(style='ko—', alpha=0.4, label='Series plotting')
>>> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Python Data Visualization: A Fast Track Approach To Learning Data Visualization With Python

Practical Python Data Visualization: A Fast Track Approach To Learning Data Visualization With Python

Ashwin Pajankar
Python: End-to-end Data Analysis

Python: End-to-end Data Analysis

Phuong Vothihong, Martin Czygan, Ivan Idris, Magnus Vilhelm Persson, Luiz Felipe Martins

Publisher Resources

ISBN: 9781788290098Supplemental ContentPurchase Link