pydata-book README

The project's README from github.com/wesm/pydata-book. As one markdown file: README.md.

Python for Data Analysis, 3rd Edition

Materials and IPython notebooks for "Python for Data Analysis, 3rd Edition" by Wes McKinney, published by O'Reilly Media. Book content including updates and errata fixes can be found for free on my website.

Buy the book on Amazon

Follow Wes on Twitter: Twitter Follow

Setup Instructions

uv is a fast Python package installer and resolver. To get started:

  1. Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Start Jupyter Notebook with all dependencies:
uv run jupyter notebook

That's it! uv will automatically create a virtual environment and install all required packages from pyproject.toml.

Option 2: Using Conda

  1. Create a new conda environment:
conda create -n pydata-book python=3.11
conda activate pydata-book
  1. Install dependencies:
pip install -r requirements.txt
  1. Start Jupyter Notebook:
jupyter notebook

Note: This project uses pandas 2.0.3 to ensure compatibility with the notebooks.

2nd Edition Readers

If you are reading the 2nd Edition (published in 2017), please find the reorganized book materials on the 2nd-edition branch.

1st Edition Readers

If you are reading the 1st Edition (published in 2012), please find the reorganized book materials on the 1st-edition branch.

IPython Notebooks:

License

Code

The code in this repository, including all code samples in the notebooks listed above, is released under the MIT license. Read more at the Open Source Initiative.

pydata-book (wesm/pydata-book)

Searching Database…

What is this?This is the companion repository of Jupyter notebooks and materials for the book 'Python for Data Analysis' by Wes McKinney, covering pandas, NumPy, and data analysis techniques.
Is this a standalone library or just notebooks for the book?It's just a set of IPython/Jupyter notebooks that follow the book's chapters, not a library or package you import into other projects.
How do I get the notebooks running?Use uv (recommended) to auto-create a virtual environment and install dependencies from pyproject.toml, then launch Jupyter Notebook; alternatively create a conda environment and install the listed dependencies.
Do I need a specific pandas version?Yes, the project pins pandas 2.0.3 so the notebooks' output matches the book exactly.
What if I'm reading an older edition of the book?The repo defaults to the 3rd Edition; readers of the 2nd or 1st Edition need to switch to the dedicated 2nd-edition or 1st-edition git branches, since the main branch material won't match older chapters.
What topics do the chapters cover?They walk through Python basics, NumPy arrays, pandas fundamentals, data loading/cleaning/wrangling, plotting, aggregation, time series, modeling library intros, and full data analysis examples, plus an advanced NumPy appendix.
Can I read the book text itself here?No, this repo only has the code notebooks; the full book content with updates and errata is hosted for free on the author's website, or it can be purchased on Amazon.
Creator
wesm
Size
63.7 MB
Stars
25K
Updated
CommitOct 17
Age
14y
Commits · 90 Days