How to drop one or multiple columns in a Pandas Dataframe?

In today’s Data Wrangling tutorial we’ll learn how to manipulate Pandas DataFrames by removing one or more columns from them. In all examples we’ll use the DataFrame.drop() method, to subset our data so we can focus our analysis. Define and load example dataset We’ll start by loading the Python Pandas library and creating our dataset … Read more

How to sum specific multiple rows in a Pandas DataFrame?

In today’s Data Wrangling tutorial we’ll show how to use Python to sum all or specific rows of a DataFrame in Pandas. Across the different examples of the tutorial we’ll use the DataFrame.sum() method along some useful parameters. Data Preparation Let’s start by importing the Pandas library into our Python development environment and define some … Read more