Pandas: groupby plotting and visualization in Python

In this data visualization recipe we’ll learn how to visualize grouped data using the Pandas library as part of your Data wrangling workflow. Data acquisition We’ll start by creating representative data. Copy the code below and paste it into your notebook: Here’s our DataFrame header: quarter area target 0 1 North 6734 1 3 South …

Read morePandas: groupby plotting and visualization in Python

How to create a Pandas barplot?

In today’s recipe we’ll learn about how to quickly draw barplots to analyze data which we already acquired into a Pandas DataFrame. We’ll look into several scenarios: Simple bar chart Using groupby to summarize values in our chart. Horizontal and Stacked Charts Formatting options: color maps, titles, font sizes, labels, etc’ Data Preparation Let’s start …

Read moreHow to create a Pandas barplot?

How to fix Matplotlib modulenotfound import errors?

In today’s post i would like to provide some troubleshooting information for people installing the matplotlib library package in their computers. ModuleNotFoundError: no module named ‘matplotlib’ pyplot This error is thrown when Python can’t find the Matplotlib package in your development environment. Most probably you’ll be able to troubleshoot this error by downloading the library …

Read moreHow to fix Matplotlib modulenotfound import errors?

Create line plots with Python in Seaborn – an example.

As part of your data wrangling and visualization process you might need to use line plots. In today’s tutorial we’ll see how you can use the Pandas and Seaborn libraries in Python to creating professional looking plots that you can share with your colleagues and management. Create Lineplot in Seaborn We’ll first setup or Python …

Read moreCreate line plots with Python in Seaborn – an example.

How to plot Seaborn histogram charts in Python?

One of the most basic charts you’ll be using when visualizing uni-variate data distributions in Python are histograms. In today’s post we’ll learn how to use the Python Pandas and Seaborn libraries to build some nice looking stacked hist charts. As we typically do, we’ll use our deliveries dataset to explain the concepts in this …

Read moreHow to plot Seaborn histogram charts in Python?

How to use Matplotlib and Seaborn to draw pie charts (or their alternatives) in Python?

As part of your data wrangling process you’ll probably need to quickly aggregate and visualize your data, so you can make sense of it, specially when working with huge data sources. In today’s tutorial we’ll leverage several Python libraries to create some simple pie charts that will help you better document and visualize your analysis. …

Read moreHow to use Matplotlib and Seaborn to draw pie charts (or their alternatives) in Python?