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, ...
Plotting methods
Get Hands-On Data Analysis with NumPy and pandas now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.