Python Data Science Handbook
Jake VanderPlas's book, free to read online and as Jupyter notebooks: IPython, NumPy, pandas, Matplotlib and scikit-learn explained in one connected story. Still one of the clearest explanations of how the Python data stack fits together, as long as you check pandas calls against the current docs.
50k (jakevdp/PythonDataScienceHandbook)
GitHub · Sept 2026
Book
AI & Machine Learning
Jake VanderPlas (O'Reilly)
4 to 6 weeks at a few hours a week
Beginner
Free
What the book covers
The Python Data Science Handbook teaches the core Python data stack as one connected toolkit rather than as separate libraries. The free online edition has five parts:
- IPython: working interactively, magic commands, timing and profiling code
- NumPy: arrays, universal functions, aggregations, broadcasting, boolean masks, fancy indexing, sorting and structured arrays
- pandas: Series and DataFrames, indexing, missing data, hierarchical indexes, combining datasets, grouping, pivot tables, string operations and time series
- Matplotlib (with seaborn): line and scatter plots, histograms, subplots, text and annotation, customisation and styles
- Machine learning with scikit-learn: the estimator API, hyperparameters and model validation, feature engineering, and chapters on common models such as naive Bayes, linear regression, support vector machines, decision trees and random forests, PCA, manifold learning, k-means and Gaussian mixtures
Is it worth it?
Yes, especially for the NumPy and scikit-learn parts. The explanations of broadcasting, vectorised operations, the bias and variance trade-off and validation curves are among the clearest available for free. Reading the book gives you a mental model of why the libraries are designed the way they are, which a list of functions cannot.
One honest caveat: the free online text was written and tested with an older Python and older library versions. Most of it still runs, but some pandas and Matplotlib calls have since changed or been deprecated. Treat the book as the explanation and the official pandas, NumPy, Matplotlib and scikit-learn documentation as the source of truth for exact syntax.
How long it takes
Reading and running every notebook takes four to six weeks at a few hours a week. You can also read single chapters on demand: the broadcasting chapter or the model validation chapter alone is worth an evening.
Prerequisites
Comfortable Python: functions, lists, dictionaries and loops. School level maths is enough for most chapters; the machine learning part is easier if you have met basic statistics.
Free or paid?
The full text is free on the website and as Jupyter notebooks on GitHub. The text is licensed CC-BY-NC-ND and the code MIT. A printed edition is published by O'Reilly if you prefer paper.
How to use it well
Clone the notebooks and run them rather than reading the website passively. Change a parameter, break a cell, and see what happens. When a call fails on a modern version, look it up in the current docs: fixing it teaches you the current API.
What you can do afterwards
Load, clean and summarise real datasets, build clear charts, and train and validate a first set of scikit-learn models with a proper train and test split and cross-validation.
Best for: students starting data science or machine learning who want one coherent free book before moving on to the official docs and projects.
Ready to start?
Opens on Jake VanderPlas (O'Reilly) in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.