A practical, hands-on introduction to data analysis with Pandas — every notebook runs, every notebook explains itself, and every dataset is included.
Like this repo? ⭐ Star it so others can find it, and fork it to work through the exercises yourself. Contributions are welcome — see Contributing.
- Learn by doing. Every topic maps to a runnable notebook — execute it locally, on Colab, or on Kaggle.
- Modern Pandas. Code targets current Pandas (2.x/3.x). Deprecated APIs
(
squeeze,sheetname,pandas.Panel) are deliberately avoided, and every notebook is verified by CI on every push. - Explained, not just code. Each notebook contains narrative explanations, not bare code cells — the why matters as much as the how.
- Reproducible. Data files ship with the notebooks,
requirements.txtpins the dependencies, and a CI test runner executes every notebook. - Real projects. Includes an end-to-end analysis project on a real public dataset, not just toy examples.
Zero setup. Click a notebook and it opens in your browser:
You need Python 3.10+.
We recommend a virtual environment to keep dependencies isolated:
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtThis installs Pandas, NumPy, Matplotlib, Seaborn, Plotly, and openpyxl.
Launch Jupyter from the repository root:
jupyter labThen open the notebooks in the order listed below. The
00_introduction.ipynb notebook explains how to
navigate the repository and how the notebooks are organized.
Core path (follow in order):
| # | Notebook | Topic |
|---|---|---|
| 1 | 01_series.ipynb |
The Series type — creation, attributes, methods |
| 2 | 02_dataframes_1.ipynb |
DataFrames: structure, selection, dtypes |
| 3 | 03_dataframes_2.ipynb |
DataFrames: sorting, ranking, filtering |
| 4 | 04_dataframes_3.ipynb |
loc/iloc indexing, missing data |
| 5 | 05_merge_join_concat.ipynb |
Combining datasets |
| 6 | 06_groupby.ipynb |
Split-apply-combine, aggregation |
| 7 | 07_multindex.ipynb |
MultiIndex, pivot, unstack |
| 8 | 08_date_time.ipynb |
Working with dates and times |
| 9 | 09_text_data.ipynb |
String methods and cleaning |
| 10 | 10_visualization.ipynb |
Plotting with Matplotlib |
| 11 | 11_input_output.ipynb |
Reading/writing CSV and Excel |
| 12 | 12_read_csv.ipynb |
Reading CSVs in detail |
| 13 | 13_options_settings.ipynb |
Display and global options |
| 14 | 14_project_chicago_salaries.ipynb |
End-to-end analysis project (real public data) |
Improvements, bug fixes, and extra exercises are welcome. Please read
CONTRIBUTING.md first — it covers setup, keeping git diffs
clean (recommended nbstripout), and the PR checklist.
Short version:
- Fork the repository.
- Make your change and keep code on modern Pandas APIs.
- Clear notebook outputs before committing.
- Verify with
python scripts/test_notebooks.py. - Open a pull request using the PR template.
Please also read NOTICE.md — it explains which material is covered by the repository license.
Thanks to everyone who has helped improve this repository.
- sivabalanb — author & maintainer
Original code in this repository is released under the MIT License. Examples and datasets derived from third-party sources are not covered by that license — see NOTICE.md for details.