Elements of Data Science teaches Python through Jupyter notebooks
An introduction to data science in Python, for people with no programming experience.
At a glance
- What is it?
- Allen B. Downey's introductory textbook takes first-time programmers from numerical expressions to data tables and statistical questions. Its notebook exercises work best when a class has a prepared runtime.
- Who is it for?
- Use Elements of Data Science for an introductory class centered on interpreting data and editing small examples. A course focused on the language itself may fit the official Python tutorial more closely.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 62 days ago.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.
Editorial analysis
A Python curriculum organized around data questions
Allen B. Downey's Elements of Data Science is a textbook built from Jupyter notebooks for readers beginning without programming experience. Its first chapter starts with values and arithmetic. Later notebooks introduce tables, distributions, relationships and regression. The progression gives an instructor a way to introduce a programming feature where it answers a question about data. Lists and NumPy arrays appear in a chapter about kinds of numerical error, for example. The programming representation and the measurement problem get taught in the same lesson.
The notebook format also constrains the scale of the work. A student sees the explanation, code and result in one document. An instructor can ask what a cell will display before anyone runs it, then have the class change a value and explain what moved. That use fits the chapter sequence because the exercises sit alongside the examples that introduce the required techniques. [Repository README](https://github.com/AllenDowney/ElementsOfDataScience/blob/v1/README.md)
Run the first chapter in Colab
Open the chapter on variables using the Colab link in the README. In the notebook, locate the setup cell ahead of the Variables and Values heading. The chapter tells readers to select that cell and press its play button, or press Shift+Enter. On a fresh runtime, the cell fetches the book's utils.py from the repository and then imports it. Its download helper checks for a file with the same name before downloading, so a preexisting copy can affect which helper is imported.
Move to the Numbers section and run the cell containing the integer example. The notebook explains that Jupyter displays the value of the expression. The next examples introduce a decimal and scientific notation. An immediate exercise is to predict what changes in the displayed value when switching between those cells, then connect the representation to a count or a measurement. The separate Jupyter introduction is linked at the top of the chapter for readers who need help with the notebook interface. [Chapter 1 source](https://github.com/AllenDowney/ElementsOfDataScience/blob/v1/01_variables.ipynb) · [Open in Colab](https://colab.research.google.com/github/AllenDowney/ElementsOfDataScience/blob/v1/01_variables.ipynb)
The jump from word counts to survey tables
The loops chapter uses a text to give iteration a concrete job. Readers count words from War and Peace with a loop and a condition. The following chapter returns to word counting and introduces dictionaries for unique words and their frequencies. Pairing those two chapters gives a class a reason to ask what the program needs to remember after processing each word. The first task needs a running count. The next needs counts keyed by the distinct words encountered.
The DataFrames chapter moves from text into records with variables of their own. The README describes an example that uses the National Survey of Family Growth to calculate an average birth weight. Between these examples the plotting notebook introduces Matplotlib and includes a Zipf plot. An instructor can use the word counts to motivate why the book makes time for plotting before the survey chapter adds table operations. [Loops notebook](https://github.com/AllenDowney/ElementsOfDataScience/blob/v1/04_loops.ipynb) · [DataFrames notebook](https://github.com/AllenDowney/ElementsOfDataScience/blob/v1/07_dataframes.ipynb)
Local notebooks put the software environment in your hands
The README distinguishes reading on NBViewer, executing in Colab and downloading for local use. The local path makes the reader responsible for libraries. The requirements file names NumPy, Jupyter, GeoPandas, Matplotlib and statsmodels, among other packages. Its entries omit version pins. The repository also includes an environment.yml and Makefile targets for creating and updating that environment. A teacher preparing a shared lab has to decide which environment students will use and verify the chapters planned for that lab.
The first chapter's remote helper creates a second consideration for a disconnected classroom. A downloaded notebook alone can still contain a cell that attempts to fetch Python code. Walk through the setup cell with the network conditions used by students and account for the helper file when preparing the lab image. [Requirements](https://github.com/AllenDowney/ElementsOfDataScience/blob/v1/requirements.txt) · [Makefile](https://github.com/AllenDowney/ElementsOfDataScience/blob/v1/Makefile)
Python's language tutorial and the book's reuse terms
The official Python tutorial organizes its examples around the language and its features. A reader who needs to look up control flow or Python data structures can go straight to those chapters. Downey's notebook sequence gives a first-time learner a path through those ideas with a recurring purpose, such as extracting counts or describing a distribution. The difference matters when choosing material for a course where each week should produce an analysis students can discuss.
The repository license distinguishes code under MIT from documentation, images and other non-code assets under CC BY-NC-SA 4.0. Someone adapting the notebooks into a course should account for that distinction when deciding what to redistribute, especially when a notebook mixes exercises, prose and code. [Repository License](https://github.com/AllenDowney/ElementsOfDataScience/blob/v1/LICENSE) · [The Python Tutorial](https://docs.python.org/3/tutorial/)
Editorial conclusion
Use Elements of Data Science for an introductory class centered on interpreting data and editing small examples. A course focused on the language itself may fit the official Python tutorial more closely. Before handing out chapter one, verify that its setup cell can import utils.py in the runtime the class will use.
Frequently asked questions
Can I run Elements of Data Science without a local installation?
The README links to Colab copies of the notebooks, where readers can execute cells and complete exercises in the browser.
Does Elements of Data Science require prior Python experience?
The author introduces it as a book for people without programming experience. Its first notebook explains how to use Jupyter and begins with Python variables and values.
Which license covers Elements of Data Science?
The repository LICENSE lists MIT for code and CC BY-NC-SA 4.0 for documentation, images and other non-code assets.
Official sources
Was this useful?