Skip to content

Pandas Tutorial

Pandas is the standard Python library for working with tabular data — anything that fits in a spreadsheet. Cleaning, transforming, analyzing, joining, and reshaping data are all 10× easier with Pandas than with raw Python or NumPy.

This tutorial is beginner-friendly — every Python snippet has a ▶ Run button so you can execute, edit, and re-run in your browser (Pandas works in Pyodide).

Topics

# Chapter
1 Introduction — why Pandas, Series vs DataFrame
2 Creating Series & DataFrames
3 Reading & Writing Files (CSV / JSON / Excel / SQL / Parquet)
4 Inspecting Data — head, info, describe
5 Selecting Columns & Rows (loc, iloc)
6 Filtering with Conditions
7 Adding, Removing, Modifying Columns
8 Handling Missing Data
9 Sorting & Ranking
10 GroupBy — Split-Apply-Combine
11 Merge, Join, Concatenate
12 Reshaping — pivot, melt, stack
13 Time Series
14 Real-World Examples

How this tutorial is organized

Every chapter follows the same beginner-friendly format:

  1. Short intro — what the concept is and when you'd use it.
  2. Runnable code — click ▶ Run to execute. Edit freely and re-run.
  3. Common pitfalls — what beginners typically get wrong.
  4. Cheatsheet — quick reference at the end.
  5. Next link — pointer to the next chapter.

Prerequisites

  • Python basics — lists, dicts, loops, functions.
  • A glance at NumPy helps (Pandas is built on top), but isn't required.

What you'll be able to do after this

  • Load any structured data — CSV, Excel, JSON, SQL — into a DataFrame.
  • Clean messy data — handle missing values, duplicates, type errors.
  • Filter, group, aggregate, pivot like SQL — but in a few lines.
  • Join multiple datasets together.
  • Work with time-series data: resampling, rolling averages, date ranges.
  • Build the foundational skill behind every data-analysis and ML project in Python.

Ready? → Start with Introduction