More on Pandas-Matplotlib integration

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 plot
  • barh: Horizontal bar plot
  • hist: Histogram
  • box: Boxplot
  • kde: Kernel Density Estimation (KDE) plot
  • density: The same as kde
  • area: Area plot
  • pie: 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.82.26