Pandas

Pandas

Pandas is a powerful Python library for data manipulation and analysis, providing data structures like DataFrames that simplify handling and analyzing structured data for various applications, from data cleaning to complex data analysis. Here, you will find hands-on tutorials, example projects and best practices for using Pandas.

23 posts
Pandas - Regular Expressions (Regex)

Pandas - Regular Expressions (Regex)

Introduction In this tutorial, we want to use regular expressions (regex) to filter, replace and extract strings of a Pandas DataFrame based on specific patterns. In order to do this, we use the str.contains() method, the str.replace() method and the str.extract() method of Pandas. Import Libraries First,...

Pandas - Unique Values of a DataFrame Column

Pandas - Unique Values of a DataFrame Column

Introduction In this tutorial, we want to count and get the unique values in a column of a Pandas DataFrame. In order to do this, we use the the nunique() method and the unique() method of Pandas. Import Libraries First, we import the following python modules: import pandas as pd...

Pandas - Concatenate DataFrames

Pandas - Concatenate DataFrames

Introduction In this tutorial, we want to concatenate multiple Pandas DataFrames. In order to do this, we use the the concat() function of Pandas. Import Libraries First, we import the following python modules: import pandas as pd Create Pandas DataFrames We create two Pandas DataFrames with some example data from...

Pandas - Join DataFrames

Pandas - Join DataFrames

Introduction In this tutorial, we want to join Pandas DataFrames. In order to do this, we use the the merge() method of Pandas. Import Libraries First, we import the following python modules: import pandas as pd Create Pandas DataFrames Next, we create two Pandas DataFrames with some example data from...

Pandas - Replace Null Values in a DataFrame

Pandas - Replace Null Values in a DataFrame

Introduction In this tutorial, we want to replace null values in a Pandas DataFrame. In order to do this, we use the the fillna() method of Pandas. Import Libraries First, we import the following python modules: import numpy as np import pandas as pd Create Pandas DataFrame Next, we create...

Pandas - Remove Null Values from a DataFrame

Pandas - Remove Null Values from a DataFrame

Introduction In this tutorial, we want to drop rows with null values from a Pandas DataFrame. In order to do this, we use the the dropna() method of Pandas. Import Libraries First, we import the following python modules: import numpy as np import pandas as pd Create Pandas DataFrame Next,...

Pandas - Remove Duplicates from a DataFrame

Pandas - Remove Duplicates from a DataFrame

Introduction In this tutorial, we want to drop duplicates from a Pandas DataFrame. In order to do this, we use the the drop_duplicates() method of Pandas. Import Libraries First, we import the following python modules: import numpy as np import pandas as pd Create Pandas DataFrame Next, we create...

Pandas - Filter Rows from a DataFrame

Pandas - Filter Rows from a DataFrame

Introduction In this tutorial, we want to filter specific rows from a Pandas DataFrame based on specific conditions. In order to do this, we use DataFrame conditions with logical operators, the loc() method and the query() method of Pandas. Import Libraries First, we import the following python modules: import pandas...

Pandas - Sort a DataFrame

Pandas - Sort a DataFrame

Introduction In this tutorial, we want to sort a Pandas DataFrame by specific columns. In order to do this, we use the  sort_values() method of Pandas. Import Libraries First, we import the following python modules: import numpy as np import pandas as pd Create Pandas DataFrame Next, we create...

You’ve successfully subscribed to Deep Learning Nerds | The ultimate Learning Platform for AI and Data Science
Welcome back! You’ve successfully signed in.
Great! You’ve successfully signed up.
Success! Your email is updated.
Your link has expired
Success! Check your email for magic link to sign-in.