Leanpub Header

Skip to main content

Elements of Data Science

Getting Started with Data Science and Python

Elements of Data Science
This book is 100% completeLast updated on 2026-10-28

An introduction to data science for people with no programming experience. Learn a small, powerful subset of Python and use it to answer real questions with real data, from survey responses to the fairness of a criminal justice algorithm.

Minimum price

$9.00

$29.00

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
About

About

About the Book

Elements of Data Science is an introduction to data science for people with no programming experience. It presents a small, powerful subset of Python that lets you do real work with data as quickly as possible: choosing questions, finding and cleaning data, exploring and visualizing it, modeling it, and communicating what you find.

You don't need to know anything about programming, statistics, or data science, and there is little math beyond arithmetic and logarithms. When the book uses a term, it defines it; when it uses a programming feature, it explains it.

The book has five parts:

• From Python to Pandas: variables, strings, dates and locations, lists and NumPy arrays, loops and files, dictionaries, and plotting

• Exploratory Data Analysis: DataFrames, distributions, relationships between variables, and linear and logistic regression

• Statistical Inference: resampling, bootstrapping, and hypothesis testing, using computation instead of mathematical analysis

• Case Study: Political Alignment, using fifty years of General Social Survey data on polarization and changing beliefs

• Case Study: Algorithmic Fairness, on COMPAS, an algorithm used in the criminal justice system, and why fairness is hard to define

Every chapter is also a Jupyter notebook you can run on Colab, with no software to install, from https://allendowney.github.io/ElementsOfDataScience. The notebooks contain the code from the book and exercises to practice what you learn.

Two editions are available in PDF and EPUB:

• Free Sample: the preface and Chapters 6 and 7

• Complete Book: all 17 chapters

The complete book is pay what you want, from $9, with a suggested price of $29. Paying for it supports free, open educational materials from Green Tea Press.

A printed edition, with a full-color interior, is available from Lulu: https://www.lulu.com/shop/allen-downey/elements-of-data-science/paperback/product-9dyrwn.html

Author

About the Author

Allen B. Downey

Allen Downey is the author of several books about programming, statistics, and data science, including Think Python, Think Stats, and Probably Overthinking It. He is Professor Emeritus at Olin College and Principal Data Scientist at PyMC Labs.

His work explores how data and statistical methods can help us understand the world, with a particular emphasis on Bayesian methods, social science, and communicating quantitative ideas to a broad audience. He also writes the Probably Overthinking It blog.

Contents

Table of Contents

  • Preface
  • Part I: From Python to Pandas
    • 1. Variables and Values
    • 2. Times and Places
    • 3. Lists and Arrays
    • 4. Loops and Files
    • 5. Dictionaries
    • 6. Plotting
  • Part II: Exploratory Data Analysis
    • 7. DataFrames and Series
    • 8. Distributions
    • 9. Relationships
    • 10. Regression
  • Part III: Statistical Inference
    • 11. Resampling
    • 12. Bootstrap Sampling
    • 13. Hypothesis Testing
  • Part IV: Case Study: Political Alignment
    • 14. Political Alignment and Polarization
    • 15. Political Alignment and Outlook
  • Part V: Case Study: Algorithmic Fairness
    • 16. Predicting Crime
    • 17. Algorithmic Fairness
  • Further Reading

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub