Python for Data Analysis
Data Wrangling with pandas, NumPy, and Jupyter
By Wes McKinney
Synopsis
Wes McKinney created the pandas library while working in quantitative finance, and this book is his guide to using it, together with NumPy and Jupyter, to load, clean, reshape and analyze data in Python. It is written for analysts new to Python and for programmers new to scientific computing. Early chapters cover Python language basics, built-in data structures, the IPython shell and Jupyter notebooks, then move to NumPy arrays and vectorized computation, the foundation beneath pandas.
The core of the book works through pandas in practice: reading files and databases, handling missing values and messy strings, joining and reshaping tables, group-by aggregation, time series and plotting with matplotlib and seaborn. A short chapter introduces modeling libraries such as statsmodels and scikit-learn, and closing case studies apply the techniques to real public datasets. The third edition, released in 2022 and since updated online for pandas 2.0, can be read free in an open-access web version, with code and data on GitHub. Readers gain fluency in the data-wrangling work that consumes much of the effort in any machine learning or analytics project, though the book does not teach modeling itself.
Scorecard
Editorial score
How it scored
Editorial score: 86.8 / 1005 weighted criteria
- 25.5/30
Influence30%
- 23.8/25
Authority25%
- 18.0/20
Practical value20%
- 12.0/15
Currency15%
- 7.5/10
Readability10%
- 86.8/100
Editorial score
How the rank was computed
Rank No. 104 of 500 comes from a composite of 62.8: observable signals 23.7 of 55 points plus editorial review 39.1 of 45 points.
All 11 inputs
| Input | Points |
|---|---|
| Observable signals | 23.7/55 |
| Reach (Amazon ratings volume) | 10.0/16.5 |
| Consensus across best-of lists | 5.5/13.8 |
| Awards and bestseller evidence | 0.0/8.3 |
| Reader rating, sample-adjusted | 6.7/8.3 |
| Amazon sales rank | 1.5/5.5 |
| Recency | 0.0/2.8 |
| Editorial review | 39.1/45 |
| Author authority | 10.7/11.3 |
| Influence | 11.5/13.5 |
| Practical value | 8.1/9.0 |
| Readability | 3.4/4.5 |
| Currency | 5.4/6.8 |
Each criterion is scored from 1 to 10 and weighted, and the points add up to the editorial score. The rank combines observable signals (55 percent) with this score (45 percent). Read the methodology.
Verdict
The authoritative pandas reference from its creator, essential for the data-preparation work that precedes nearly every machine learning project.
Strengths
- Written by the creator of pandas
- Free open-access edition updated for pandas 2.0
- Thorough coverage of real data-cleaning tasks
Keep in mind
It is a tools reference rather than a machine learning book, and readers expecting model building or deep learning will need a companion text.
Key takeaways
- Vectorized NumPy and pandas operations replace slow Python loops, making it practical to explore and transform large tables interactively.
- Data preparation, meaning loading, cleaning, transforming and rearranging, takes a large share of analysis time, so mastering it pays off across projects.
- The split-apply-combine pattern behind pandas group-by handles a wide range of summarization and feature-engineering tasks with concise code.
- Jupyter notebooks support an exploratory workflow in which data can be inspected, transformed and visualized one step at a time.
Notable facts
- The third edition is free to read in an open-access HTML version updated for pandas 2.0 and Python 3.10, with MIT-licensed code on GitHub. Source (opens in a new tab)
- McKinney created the pandas library and serves as its “Benevolent Dictator for Life.” Source (opens in a new tab)
About the author
Questions
Is Python for Data Analysis good for learning machine learning?
Which edition of Python for Data Analysis should I read?
Is Python for Data Analysis suitable for beginners?
Related books
- Deep Learning with Python François Chollet, Tomasz Kalinowski and J. J. Allaire
- Designing Machine Learning Systems Chip Huyen
- Hands-On Machine Learning with Scikit-Learn and PyTorch Aurélien Géron
- Designing Data-Intensive Applications Martin Kleppmann and Chris Riccomini
- Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow Aurélien Géron
- The Data Warehouse Toolkit Ralph Kimball and Margy Ross
Sources
As an Amazon Associate, Best AI Books earns from qualifying purchases. Best AI Books is sponsored by Iternal.ai, whose founder and CEO, John Byron Hanby IV, wrote The AI Strategy Blueprint, our #1 ranked book. How we rank books.






