Pandas provides the DataFrame data structure commonly used in handling multivariate data. When we usually use the Pandas package for data I/O, storage, and preprocessing, it also provides a number of native integrations with Matplotlib for quick visualization.
To create these plots, we can call df.plot(kind=plot_type)
, df.plot.scatter()
, and so on. Here is a list of available plot types:
line
: Line plot (default)bar
: Vertical bar plotbarh
: Horizontal bar plothist
: Histogrambox
: Boxplotkde
: Kernel Density Estimation (KDE) plotdensity
: The same askde
area
: Area plotpie
: Pie plot
We have created some of the simpler graphs in the previous chapters. Here, we will take the density plot as an example for discussion.