Guide · Open source
How to use PythonDataScienceHandbook: read, run and install
Updated · written with AI from the project's own documentation and checked against our catalogue data
PythonDataScienceHandbook is the full text of the Python Data Science Handbook, published as Jupyter notebooks so the explanations and code examples sit side by side. This guide explains the three main ways to use it: reading online, running notebooks in Colab or Binder, and setting up a local conda environment. It is written for readers who already know some Python and want to learn NumPy, Pandas, Matplotlib or Scikit-Learn by running code.
Quick start
- 1Pick how you will run it. Choose between reading online, running in Colab or Binder, or installing locally with conda.
- 2Open the index notebook. Start from Index.ipynb, which the README provides as an index of the notebooks.
- 3Install the requirements. Run conda install --file requirements.txt in your current environment, or create a PDSH environment with Python 3.5.
- 4Run the examples in order. Read each section and run its code cells, changing values to see how the results differ.
- 5Adjust versions if needed. If a pinned package version is unavailable on your platform, tweak it as the README advises.
What the repository contains
The repository holds the entire Python Data Science Handbook in the form of Jupyter notebooks. The book introduces core libraries for working with data in Python, particularly IPython, NumPy, Pandas, Matplotlib and Scikit-Learn, plus related packages.
An index of the notebooks is available as Index.ipynb, which the README links to as an accompanying guide to the text.
- Notebooks are kept in the repository's notebooks directory.
- The README describes the book as free Jupyter notebooks; the printed book is sold separately by O'Reilly Media.
Read the book online
The simplest way to use the handbook needs no setup. The README links to the full book online, so you can read the text in a browser.
The README says familiarity with Python is assumed. If you need an introduction to the language first, it points to the free companion project A Whirlwind Tour of Python.
Run the code without local setup using Colab or Binder
The README offers two hosted options. Google Colab and Binder both open the Index notebook from the repository, so you can run the examples without installing anything on your own machine.
These options are useful if you want to try the notebooks before deciding whether to set up a local environment.
- Google Colab: open the Index notebook through the Colab badge in the README.
- Binder: launch a live notebook server through the Binder badge in the README.
Install the requirements locally with conda
To run the notebooks on your own computer, the README uses conda. The packages the author used are listed in requirements.txt. The README warns that some exact version numbers may not be available on your platform, so you may need to adjust them.
To install the requirements into your current conda environment, run the command below. To create a separate environment named PDSH with Python 3.5 and the required packages, use the second command. The README notes that you can read more about conda environments in the Managing Environments section of the conda documentation.
- Requires Python (the README names 3.5 as the tested version) and conda.
- The README says other Python versions, including 2.7, should work in nearly all cases, but this is not guaranteed.
$ conda install --file requirements.txt
$ conda create -n PDSH python=3.5 --file requirements.txtWork through the notebooks
Once you have the notebooks open, whether locally or in Colab or Binder, read each section's explanation and run its code cells in order. The README describes the notebooks as keeping explanations and code together, so you can change an example and rerun it.
Start with the library areas you need. The README names IPython, NumPy, Pandas, Matplotlib and Scikit-Learn as the core libraries covered.
- Use Index.ipynb to find the notebook for each topic.
- Run the code as you read rather than only reading the text.
Know the licence before reusing material
The code in the repository, including code samples in the notebooks, is released under the MIT license. The text of the book is released under the CC-BY-NC-ND license, which the README links to on Creative Commons.
If you plan to reuse the book's text, check the CC-BY-NC-ND terms rather than assuming the MIT licence covers it.
What people use it for
- Learning NumPy, Pandas, Matplotlib or Scikit-Learn through hands-on notebook examples.
- Reviewing a practical tour of data science libraries after already knowing Python.
- Trying the code in a browser through Colab or Binder before setting up locally.
- Reading the book online while running the code alongside the text.
Frequently asked questions
Is PythonDataScienceHandbook free?
The repository is described in the README as free Jupyter notebooks. The code is released under the MIT license, while the book's text is under CC-BY-NC-ND. The printed book is sold separately by O'Reilly Media.
How do I install PythonDataScienceHandbook?
The README uses conda rather than a single installer. Run conda install --file requirements.txt in your current environment, or create a separate PDSH environment with conda create -n PDSH python=3.5 --file requirements.txt.
What Python version does the handbook need?
The README says the book was written and tested with Python 3.5. It also says other versions, including Python 2.7, should work in nearly all cases.
Can I run the notebooks without installing anything?
Yes. The README links to Google Colab and Binder, which both open the notebooks so you can run the code without local setup.
Is this good for complete beginners to Python?
Not really. The README says familiarity with Python is assumed. It recommends the companion project A Whirlwind Tour of Python for learning the language first.
What are the alternatives to this handbook?
The source lists A Whirlwind Tour of Python and Jupyter Notebook as comparable projects. A Whirlwind Tour of Python is the README's own companion for learning Python itself.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
PythonDataScienceHandbook suits readers who already know Python and want to learn core data libraries by running notebook code next to the text. Complete beginners should start with A Whirlwind Tour of Python, and anyone who needs current library versions should expect to adjust the pinned requirements.
Install options & downloads