You Don’t Need Matplotlib When Pandas Is Enough for Data Visualisation

Created in Canva by Author

One line of code to plot data makes routine EDA jobs easier

6 min read

21 hours ago

It is very common to use data visualisation libraries such as Matplotlib, Seaborn, and Plotly. However, during the day-by-day ad hoc EDA analysis, I found that we may not have to use these libraries. In fact, the Pandas library itself might be good enough for these jobs.

In this article, I’ll introduce how to use Pandas Plot to generate common types of charts without Matplotlib. Actually, Pandas Plot utilises Matplotlib objects behind the scene. However, the convenience is that we can very easily plot from the dataframe using one line of code.

Of course, there are lots of limitations if we are constrained to use Pandas Plot. So, I would suggest to use it only when it is enough. In the last section, I’ll also give some scenarios that Pandas Plot can’t help. I hope this article will be useful.

1. Sample Dataset

Created in Canva by Author

Usually, my articles start with installing the library. However, we can skip it for Pandas because it’s too common. Also, in most…