C1
Preliminaries
What kind of data the book means, why Python, the seven core libraries, and a modern conda-forge setup.
Books · Data science
The pandas creator’s own guide to wrangling data in Python — NumPy, pandas, matplotlib and Jupyter, taught through real datasets. 3rd edition. Logged as a full chapter-by-chapter course.
Once students can write Python, the next question is always "what do I do with it?" — and for most of them the honest answer is data: a spreadsheet, a CSV export, a log file. Wes McKinney wrote pandas, so this is the tool explained by the person who built it, with the reasoning behind the design rather than just the API.
My copy was the 2012 first edition, which turned out to be a lesson of its own: its code is
Python 2 and pandas 0.9 (.ix, xrange, easy_install), and
a lot of it no longer runs. So this course follows the 3rd edition's outline and writes every
example for current pandas.
Each chapter is split into short sessions — concept, key terms, a worked example and exercises — with one interactive demo per chapter. 5 of 15 are up; the rest are stamped in progress until their page exists.
C1
What kind of data the book means, why Python, the seven core libraries, and a modern conda-forge setup.
C2
The interpreter, IPython and notebooks, introspection with ?, object references, scalar types, and control flow.
C3
Tuples, lists, dicts and sets, comprehensions, functions as objects, generators, exceptions, and file I/O.
C4
The ndarray, views vs. copies, boolean and fancy indexing, ufuncs, np.where, and a vectorised random walk.
C5
Series, DataFrame and Index; reindexing, loc vs. iloc, label alignment, sorting, and descriptive statistics.
C6
read_csv and friends, JSON, HTML and XML, binary formats like Parquet and Excel, web APIs, and databases.
C7
Missing data, duplicates, mapping and replacing values, binning, outliers, string methods, and categoricals.
C8
Hierarchical indexing, merge and join, concat, and reshaping with stack, unstack, pivot and melt.
C9
The matplotlib figure/axes model, plotting straight from pandas, and seaborn for statistical charts.
C10
Split-apply-combine with groupby, agg, apply and transform, pivot tables, and cross-tabulation.
C11
Timestamps and periods, date ranges and frequencies, time zones, resampling, and moving-window functions.
C12
Handing pandas data to models: Patsy formulas, statsmodels, and scikit-learn.
C13
Five real datasets end to end — Bitly, MovieLens, US baby names, the USDA food database, and FEC donations.
A
ndarray internals and strides, C vs. Fortran order, broadcasting rules, structured arrays, and performance tips.
B
Command history, the shell, magic commands like %timeit and %debug, and profiling.
Worth the time — but read it as a reference you work through at a keyboard, not a book you read on the sofa. Chapters 5, 7, 8 and 10 (pandas basics, cleaning, wrangling, groupby) are the core; together they cover most of what a real analysis needs.
The shift that matters is mental: stop writing loops over rows and start thinking in whole columns, aligned by their index.
Skip the first edition. The ideas hold up; the code doesn't.
McKinney publishes the full 3rd edition free online at wesmckinney.com/book, and the example datasets live in the pydata-book repository. The book was written against Python 3.10; everything on these pages is checked against current pandas (3.0), and works on 2.x unless a page says otherwise.