How to replace values in Pandas series?

In today’s recipe i would like to expand on different methods for replacing values in a Pandas series. In this tutorial we’ll do extensive usage of the Series replace method, that will prove very useful to quickly manipulate our data. Replacing data in a Python series We’ll touch on several cases: Change Series values Replacing … Read more

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 more

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 more

Matplotlib and Seaborn pie charts 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 more

How to delete columns from your Pandas dataframe?

Yesterday we learnt about how we can easily delete rows from a dataframe based on specific conditions, and today, we’ll focus on a similar process just for columns. In this post we’ll show how to handle a few scenarios: Removing one columns based on labels Deleting multiple columns based on labels Dropping columns base on … Read more