Pandas Tutorial — Complete Guide to Pandas for Data Analysis
Welcome to the complete Pandas tutorial — a hands-on guide to mastering Pandas, the de facto standard for data analysis in Python. Whether you’re moving from Excel, switching from SQL, or graduating from raw NumPy, this tutorial takes you from your first pd.Series to building end-to-end analysis pipelines.
| 17 Chapters | ~126 Lessons | Intermediate Level |
What is Pandas?
Pandas (from “panel data”) is Python’s premier library for working with tabular data — CSVs, spreadsheets, database tables, time series. It gives you:
Series— a labeled 1-D array (think one column).DataFrame— a labeled 2-D table (think a worksheet or SQL table).Indexobjects — explicit row and column labels that travel with your data.- Fast vectorized operations built on NumPy.
- A vast I/O ecosystem — CSV, Excel, JSON, SQL, Parquet, HDF5, and more.
If NumPy is the grammar of scientific Python, Pandas is its vocabulary for real-world data.
Tutorial Details
| Level | Intermediate |
| Chapters | 17 |
| Lessons | ~126 |
| Prerequisites | Python Basics + NumPy fundamentals |
| Python version | 3.10+ |
| Pandas version | 2.0+ |
What You’ll Learn
By the end of this tutorial, you will be able to:
- Load data from CSV, Excel, JSON, SQL databases, and Parquet files.
- Explore and clean DataFrames using
.info(),.describe(),.isnull(), and friends. - Index and slice with
loc,iloc,at, andiat— and avoidSettingWithCopyWarning. - Filter rows like a SQL pro with boolean indexing,
query(),where(),mask(). - Handle missing data with
dropna,fillna, andinterpolate. - Group and aggregate with
groupby,pivot_table, andcrosstab. - Merge and concatenate DataFrames like SQL JOINs.
- Work with dates:
to_datetime,resample,rolling, time zones. - Optimize memory with categorical dtypes, downcasting, and chunked reading.
- Visualize directly from DataFrames with
.plot(). - Build end-to-end analysis pipelines for sales, stocks, and survey data.
Prerequisites
You should be comfortable with:
- Python syntax: functions, lists, dicts, comprehensions.
- Basic NumPy: creating arrays, indexing, vectorized operations.
- Running Python scripts and using
pip install.
If you need a refresher, start with the Python Basics Tutorial and the NumPy Tutorial.
Chapters
| # | Chapter | Topics |
|---|---|---|
| 1 | Introduction to Pandas | What Pandas is, Excel/SQL parallels, installation, Pandas 2.x |
| 2 | Series | Creating, indexing, alignment, methods |
| 3 | DataFrame | Creation, attributes, columns, exploration, display options |
| 4 | Data Import & Export | CSV, Excel, JSON, SQL, Parquet, HDF5 |
| 5 | Indexing & Selection | loc, iloc, at, iat, SettingWithCopyWarning |
| 6 | Filtering & Queries | Boolean indexing, query, where, mask, isin |
| 7 | Sorting & Ranking | sort_values, sort_index, rank, nlargest |
| 8 | Handling Missing Data | isna, dropna, fillna, interpolate, strategies |
| 9 | Data Type Operations | astype, categorical, string and datetime accessors, nullable types |
| 10 | Apply & Vectorized | map, apply, transform, eval, performance |
| 11 | GroupBy & Aggregation | groupby, agg, pivot_table, crosstab |
| 12 | Merge, Join & Concat | merge, join, concat, combine_first |
| 13 | DateTime & Time Series | to_datetime, date_range, resample, rolling |
| 14 | MultiIndex | Creation, indexing, stack/unstack, swaplevel |
| 15 | Performance & Memory | Memory profiling, downcasting, chunking, Dask |
| 16 | Visualization | .plot(), plot types, styling, plotting tools |
| 17 | Practice Projects | Sales, COVID, stocks, employee cleaning, FAQ |
Learning Path
- Chapters 1–4 — Fundamentals: Series, DataFrame, I/O. Required.
- Chapters 5–9 — Daily-use skills: selecting, filtering, cleaning. Required.
- Chapters 10–12 — Transformations and joins. The heart of analysis.
- Chapters 13–14 — Time series and hierarchical data.
- Chapters 15–16 — Polish: scale and visualization.
- Chapter 17 — End-to-end projects.
You can also drop into any chapter — each is self-contained with a hub page and runnable examples.