Plotting methods
The key pandas objects, series, and DataFrames come supplied with a plotting method, simply known as plot. It can easily create plots such as line plots, scatter plots, bar charts, or what are known as kernel density estimation plots (used to get a sense of the shape of the data), and so on. There are many plots that can be created. We can control which plot we want by setting the kind parameter in plot, to a string, indicating which plot we want. Often this produces some plot with usually well-chosen default parameters. We can have more control over the final output by specifying other parameters in the plot method, which are then passed on to Matplotlib. Thus we can control issues such as labeling, the style of the plot, ...
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.
Read now
Unlock full access