pandas for Data Science

Learning PathSkills: pandas, Data Science, Data Visualization, DataFrame, GroupBy, Data Cleaning

A person meditating on the left, thinking about Python, a panda sleeping on the right, dreaming of bamboo, with a structure and a Python-themed gong in the middle between them

In this learning path, you’ll learn how to analyze data in Python using pandas. Starting with DataFrames and dataset exploration, you’ll clean, sort, and transform data, create visualizations, and use GroupBy, merge, and pivot tables. You’ll finish with performance tips and idiomatic pandas patterns.

pandas for Data Science

Learning Path ⋅ 15 Resources

Getting Started With pandas

Get up and running with pandas. You’ll learn the basics of DataFrames and how to explore datasets.

Title image for Introduction to pandas (A person meditating on the left, thinking about Python, a panda sleeping on the right, dreaming of bamboo, with a structure and a Python-themed gong in the middle between them)

Course

Introduction to pandas

Learn pandas DataFrames: explore, clean, and visualize data with powerful tools for analysis. Delete unneeded data, import data from a CSV file, and more.

Title image for Explore Your Dataset With pandas (Using Pandas and Python to Explore Your Dataset)

Course

Explore Your Dataset With pandas

Learn how to start exploring a dataset with pandas and Python. You'll learn how to access specific rows and columns to answer questions about your data. You'll also see how to handle missing values and prepare to visualize your dataset in a Jupyter Notebook.

Title image for The pandas DataFrame: Working With Data Efficiently (The Pandas DataFrame: Make Working With Data Delightful)

Course

The pandas DataFrame: Working With Data Efficiently

In this course, you'll get started with pandas DataFrames, which are powerful and widely used two-dimensional data structures. You'll learn how to perform basic operations with data, handle missing values, work with time-series data, and visualize data from a pandas DataFrame.

Reading, Writing, and Cleaning Data

Learn how to read and write data files, sort and clean your data, and avoid common pitfalls with views and copies.

Title image for Reading and Writing Files With pandas (Pandas: How to Read and Write Files)

Course

Reading and Writing Files With pandas

Learn about the pandas IO tools API and how you can use it to read and write files. You'll use the pandas read_csv() function to work with CSV files. You'll also cover similar methods for efficiently working with Excel, CSV, JSON, HTML, SQL, pickle, and big data files.

Title image for Sorting Data in Python With pandas (Pandas Sort: Your Guide to Sorting Data in Python)

Course

Sorting Data in Python With pandas

Learn how to sort data in a pandas DataFrame using the pandas sort functions sort_values() and sort_index(). You'll learn how to sort by one or more columns and by index in ascending or descending order.

Title image for Data Cleaning With pandas and NumPy (Pythonic Data Cleaning With Pandas and NumPy)

Course

Data Cleaning With pandas and NumPy

Learn how to clean up messy data using pandas and NumPy. You'll become equipped to deal with a range of problems, such as missing values, inconsistent formatting, malformed records, and nonsensical outliers.

Title image for SettingWithCopyWarning in pandas: Views vs Copies (SettingWithCopyWarning in Pandas: Views vs Copies)

Tutorial

SettingWithCopyWarning in pandas: Views vs Copies

Learn about views and copies in NumPy and pandas. You'll see why the SettingWithCopyWarning occurs in pandas and how to properly write code that avoids it.

Visualizing and Analyzing Data

Create visualizations with pandas, group and combine data, build pivot tables, and compute correlations.

Title image for Plot With pandas: Python Data Visualization Basics (Plot With Pandas: Python Data Visualization for Beginners)

Course

Plot With pandas: Python Data Visualization Basics

In this course, you'll get to know the basic plotting possibilities that Python provides in the popular data analysis library pandas. You'll learn about the different kinds of plots that pandas offers, how to use them for data exploration, and which types of plots are best for certain use cases.

Title image for pandas GroupBy: Grouping Real World Data in Python (Pandas GroupBy: Your Guide to Grouping Data in Python)

Course

pandas GroupBy: Grouping Real World Data in Python

Learn how to work adeptly with the pandas GroupBy while mastering ways to manipulate, transform, and summarize data. You'll work with real-world datasets and chain GroupBy methods together to get data into an output that suits your needs.

Title image for Combining Data in pandas With concat() and merge() (Combining Data in Pandas With merge(), .join(), and concat())

Course

Combining Data in pandas With concat() and merge()

Learn two techniques for combining data in pandas: merge() and concat(). Combining Series and DataFrame objects in pandas is a powerful way to gain new insights into your data.

Title image for How to Create Pivot Tables With pandas (How to Create a Pivot Table With pandas)

Tutorial

How to Create Pivot Tables With pandas

Learn how to create pivot tables using pandas. You'll explore the key features of DataFrame's pivot_table() method and practice using them to aggregate your data in different ways.

Title image for NumPy, SciPy, and pandas: Correlation With Python (NumPy, SciPy, and Pandas: Correlation With Python)

Tutorial

NumPy, SciPy, and pandas: Correlation With Python

Learn what correlation is and how you can calculate it with Python. You'll use SciPy, NumPy, and pandas correlation methods to calculate three different correlation coefficients. You'll also see how to visualize data, regression lines, and correlation matrices with Matplotlib.

Performance and Best Practices

Speed up your pandas code and learn idiomatic patterns. Put your skills to practice by building a gradebook project.

Title image for Fast, Flexible, Easy and Intuitive: How to Speed Up Your pandas Projects (Python & Pandas)

Tutorial

Fast, Flexible, Easy and Intuitive: How to Speed Up Your pandas Projects

What is it about pandas that has data scientists, analysts, and engineers raving? This is a guide to using pandas Pythonically to get the most out of its powerful and easy-to-use built-in features. Additionally, you will learn a couple of practical time-saving tips.

Title image for Idiomatic pandas: Tricks & Features You May Not Know (Pandas Tricks)

Course

Idiomatic pandas: Tricks & Features You May Not Know

In this course you'll see how to use some lesser-used but idiomatic pandas capabilities that lend your code better readability, versatility, and speed.

Title image for Using pandas to Make a Gradebook in Python (Pandas Project: Make a Gradebook With Pandas)

Course

Using pandas to Make a Gradebook in Python

With this course and Python project, you'll build a script to calculate grades for a class using pandas. The script will quickly and accurately calculate grades from a variety of data sources. You'll see examples of loading, merging, and saving data with pandas, as well as plotting some summary statistics.

Congratulations on completing this learning path! You’ve learned how to use pandas for data analysis in Python, from DataFrames and data cleaning to visualization and advanced operations.

If you’d like to continue building your data skills, check out these related learning paths:

Got feedback on this learning path?

Looking for real-time conversation? Visit the Real Python Community Chat or join the next “Office Hours” Live Q&A Session. Happy Pythoning!

« Browse All Learning Paths