Plotting with a Series: Histogram, Box Plot, and Kernel Density
Explore how to create plots from Series with pandas.
We'll cover the following
Inspecting statistical summaries and tables can reveal much about our data. Another technique to understand the data at a more intuitive level is to plot it. Plotting leads to unbelievable insights, which we could not come across otherwise. Mastering visualization is a huge benefit when dealing with data.
Plotting in Jupyter
Pandas has native integration with Matplotlib. To leverage it in Jupyter, make sure to include the following cell magic to tell Jupyter to display the plots in the browser:
%matplotlib inline
The plot
attribute
A series object has a plot
attribute. This attribute is interesting because we can call it directly to create plots or access its subattributes. Let’s load the snow data and create some plots:
Get hands-on with 1400+ tech skills courses.