Pandas Builtin Visualization Functions

3 Most used functions to visualize your data

Khalid Salem
The Startup
2 min readSep 14, 2020

--

By Author

Pandas is a great tool for managing and importing your data. And with this easy and small tutorial, I will go take you through some of the important and fast functions to plot your data with out the need to use matplotlib.

Let’s get started.

Import data using pandas:

First, we need to import the CSV file which we’ll apply the functions on.

This is how the data file look like:

By Author

Now, let’s see what plots can we apply on our data.

1. Histogram:

Plot the frequency of data. Frequency means how many times a range of values appeared. We can define the range by something called bins, it’s how many divisions we’ll split the data to.

For example if we want to plot the histogram for column ‘a’, we run this line and set the bins for 20.

Histogram — By Author

2. Scatter:

Scatter here represents the data values in form of dots with respect to two different numeric variables.

We do that by running this line:

Scatter — By Author

3. Bar:

Each Bar represents the category and its value on the y-axis.

Bar — By Author

Conclusion

These are the most important and used functions for plotting with pandas. If you want more of this you can find at this link. I hope this article is useful.

Thank you.

--

--