Free course · Practical reference · Real Python

Understand your data.
Explain your code.

Learn pandas from Python dictionaries to complete data analysis. Predict a result, run the code, change something, and explain what happened.

Dr. Ali Al BatainehComputer Information ScienceHigher Colleges of Technology, Ras Al Khaimah, United Arab Emirates
30 modules120 worked examples & tasks8 independent assessment tasks6 data file formats

Choose your starting point

New to Python

Begin with variables, lists, and dictionaries. Build your first table one step at a time.

Start from the beginning

Coming from spreadsheets

Start with tables and familiar operations, then explore indexes, grouping, and files.

Start with DataFrames

Already using Python

Explore pandas behavior: labels, selection, missing data, joins, and grouped calculations.

Start with Series

Solving a problem today

Find a short example, a common mistake, and a link to the full explanation.

Open the reference

Make understanding visible

Each lesson includes a small example, three questions, a change to make, a hint, a worked solution, and a code check. Follow the guided path or switch a lesson to Quick reference.

Written explanations matter. A successful code check shows that the programmed requirements passed; use the independent assessment and its rubric to examine understanding on unfamiliar data.

The complete learning path

Move in order or use a module's prerequisites to choose where to begin.

00 · Foundation

A short Python bridge

Read the small amount of Python needed to begin the pandas lessons.

4 learning cells · questions, practice & solutions
01 · Foundation

Start with a dictionary

Read, access, and change named values in a Python dictionary.

4 learning cells · questions, practice & solutions
02 · Foundation

From one student to many

Represent several records with lists and dictionaries before building a table.

4 learning cells · questions, practice & solutions
03 · Foundation

Meet the pandas Series

Create a labeled column and explain positions, labels, and arithmetic.

4 learning cells · questions, practice & solutions
04 · Foundation

Build and inspect a DataFrame

Turn Python data into a table and inspect its structure before analysis.

4 learning cells · questions, practice & solutions
05 · Foundation

Select exactly what you need

Choose rows, columns, and individual cells using labels and positions.

4 learning cells · questions, practice & solutions
06 · Core

Filter with conditions

Build Boolean masks and combine conditions to answer precise questions.

4 learning cells · questions, practice & solutions
07 · Core

Sorting and index decisions

Order records deliberately and control which labels identify rows.

4 learning cells · questions, practice & solutions
08 · Core

Create and update columns

Calculate new fields, tidy column names, and change selected values safely.

4 learning cells · questions, practice & solutions
09 · Core

Data types and safe conversion

Choose a useful data type and identify values that cannot be converted.

4 learning cells · questions, practice & solutions
10 · Core

Missing values and honest cleaning

Find missing entries and choose a treatment that fits the question.

4 learning cells · questions, practice & solutions
11 · Core

Duplicates and data quality

Find repeated records and validate IDs, ranges, and allowed labels.

4 learning cells · questions, practice & solutions
12 · Core

Clean and search text

Standardize labels and extract useful pieces from text columns.

4 learning cells · questions, practice & solutions
13 · Core

Dates, times, and durations

Parse dates explicitly and use calendar-aware operations.

4 learning cells · questions, practice & solutions
14 · Core

Map, apply, and vectorize

Choose an appropriate way to transform values and create categories.

4 learning cells · questions, practice & solutions
15 · Core

Statistics you can explain

Summarize center, spread, completeness, and association with clear interpretations.

4 learning cells · questions, practice & solutions
16 · Core

Group, summarize, and compare

Distinguish group summaries, row-aligned transformations, and group filters.

4 learning cells · questions, practice & solutions
17 · Core

Merge related tables

Connect tables by a key and audit which records matched.

4 learning cells · questions, practice & solutions
18 · Core

Concatenate and align

Combine rows or columns while respecting index labels.

4 learning cells · questions, practice & solutions
19 · Core

Reshape tables

Move between long and wide layouts and choose when to aggregate.

4 learning cells · questions, practice & solutions
20 · Core

Read and write files

Move data between pandas and common local file formats.

4 learning cells · questions, practice & solutions
21 · Extension

Work with time series

Distinguish calendar dates, observed records, windows, and changes over time.

4 learning cells · questions, practice & solutions
22 · Extension

Explore richer structures

Use multiple index levels, list-valued columns, and categorical encodings.

4 learning cells · questions, practice & solutions
23 · Extension

Work efficiently and reproducibly

Read less data, combine chunk summaries correctly, and make repeatable samples.

4 learning cells · questions, practice & solutions
24 · Core

Plot and interpret

Select a plot that answers a clear question and label its units.

4 learning cells · questions, practice & solutions
25 · Apply

Debugging clinic

Find the reason a pandas result is wrong, then repair it.

4 learning cells · questions, practice & solutions
26 · Apply

End-to-end classroom project

Clean, audit, summarize, visualize, and export a small dataset with an explanation of every choice.

4 learning cells · questions, practice & solutions
27 · Extension

Import CSV and text with confidence

Choose explicit parsing rules, preserve identifiers, and verify imported records.

4 learning cells · questions, practice & solutions
28 · Extension

Work across Excel and JSON formats

Read worksheets and JSON structures without changing the underlying observations.

4 learning cells · questions, practice & solutions
29 · Apply

Analyze a real public dataset

Produce a traceable descriptive analysis with justified exclusions and visible denominators.

4 learning cells · questions, practice & solutions