Interesting right? As we know that Pandas used mainly for data exploration or data manipulation. There is, however, a Pandas functionality that people often overlooked, and that is the plotting function.
Let’s try one of the functions called hist to create a histogram plot:
import seaborn as sns import pandas as pd mpg = sns.load_dataset('mpg') mpg['mpg'].hist()
So easy, right? You only need to type one function, and Pandas would do the rest for you.
The one that I show you before is plotting function that came from the Series object. There is another plotting function we can use without relying on the object.
Let me show you an example by creating a scatter matrix:
import matplotlib.pyplot as plt
pd.plotting.scatter_matrix(mpg, figsize = (8,8))
plt.show()
A simple plot for every single variable against another variable is created for us to analyze. It might not look the best, but it is a quick function compared to the other package.
That is all! I hope it helps!