Back to Blog

finding the best books for learning python

November 17th, 2020


its almost that time of year when people want to learn python

As we get closer to the end of one of the oddest years on record and everyone changes their Google search queries to 'best python books 2021', I thought it might be a good time to tackle the incredibly popular question of "If I want to learn Python, what books should I read?". There are endless articles on the topic - and basically any article will lead you to Automate the Boring Stuff - but I thought it was time to throw my hat in the ring, so to speak. If you're not a regular reader, I've done this a few times in the past with newsletters, twitter accounts, and podcasts.

Just as a forewarning, in a few past articles I documented all the code I used to get to the results of the post. This time I'm not doing so, and I'm sorry.

I mean I'm not really sorry - it takes a lot more effort to format my code from a sketchy jupyter notebook to a presentable-ish jupyter notebook. So we're just looking at results and random commentary from me this time!

Anyways, on to the stuff you care about - the top python books to read this year.

top python books to read in 2021

All the data points here are from Goodreads, which is... probably not the best way to get the data if we're being honest, but its the one I had available to me. So... books! The list below includes both beginner and not-beginner books - I'll go through the list at another time and split those out, but for now I'm just posting this online.

titleauthoraverage_ratingratings_countpublish_date
Fluent Python: Clear, Concise, and Effective ProgrammingLuciano Ramalho4.667772015-01-25
Grokking Algorithms An Illustrated Guide For Programmers and Other Curious PeopleAditya Y. Bhargava4.411,5762015-01-01
Deep Learning with PythonFrancois Chollet4.646802018-12-04
Hands-On Machine Learning with Scikit-Learn and TensorFlowAurélien Géron4.556512017-04-09
Automate the Boring Stuff with Python: Practical Programming for Total BeginnersAl Sweigart4.281,4322014-11-25
Python Crash Course: A Hands-On, Project-Based Introduction to ProgrammingEric Matthes4.359762015-02-25
Python for Data AnalysisWes McKinney4.131,2262011-12-30
Learning PythonMark Lutz3.961,9762013-07-24
Effective Python: 59 Specific Ways to Write Better PythonBrett Slatkin4.296302015-02-01
Python Machine LearningSebastian Raschka4.274112015-09-23
Programming PythonMark Lutz3.988481996-08-01
Python Data Science Handbook: Tools and Techniques for DevelopersJake Vanderplas4.322852016-03-25
Introduction to Machine Learning with Python: A Guide for Data ScientistsAndreas C. Müller4.342572015-06-25
Python for Everybody: Exploring Data in Python 3Charles Severance4.312562016-07-10
Python CookbookDavid Beazley4.163742002-07-15
Learn Python The Hard WayZed A. Shaw3.878812010-01-01
Flask Web Development: Developing Web Applications with PythonMiguel Grinberg4.193022014-04-28
Data Science from Scratch: First Principles with PythonJoel Grus3.935522015-04-14
Test-Driven Web Development with PythonHarry Percival4.212372010-01-01
Black Hat Python: Python Programming for Hackers and PentestersJustin Seitz4.043192014-11-25
Python Pocket ReferenceMark Lutz4.003071998-03-15
Introducing Python: Modern Computing in Simple PackagesBill Lubanovic4.211702013-11-22
A Common-Sense Guide to Data Structures and Algorithms: Level Up Your Core Programming SkillsJay Wengrow4.221602017-08-22
Head First PythonPaul Barry3.833202010-01-01
Python Testing with Pytest: Simple, Rapid, Effective, and ScalableBrian Okken4.061192017-10-25
Think StatsAllen B. Downey3.633152011-01-01
The Self-Taught Programmer: The Definitive Guide to Programming ProfessionallyCory Althoff4.00712017-01-24
Serious Python: Black-Belt Advice on Deployment, Scalability, Testing, and MoreJulien Danjou4.03642018-12-01
Feature Engineering for Machine LearningAlice Zheng3.81802018-04-10
Impractical Python Projects: Playful Programming Activities to Make You SmarterLee Vaughan4.24312018-11-27
Python Flash Cards: Syntax, Concepts, and ExamplesEric Matthes4.08122019-01-15
High Performance Python: Practical Performant Programming for HumansMicha Gorelick4.1772013-10-22

And what's with the weird sorting, you ask? Well its a combination of average rating & ratings count that I made up for another project that I like a lot.

So which one should I read if I'm a beginner?

So if we filter down the list above which books are primarily for beginners, you end up with a solid starting point:

And those are only the top five books on there. Grokking Algorithms is a bit more focused on the computer science aspects of coding rather than the python language, but it does use Python for its examples. And Python for Data Analysis is basically focused on a python package called pandas, which is what any data scientist/analyst spends most of their day in. So if you're truly a beginner, focus on Automate the Boring Stuff, Python Crash Course, and Learning Python.

And definitely keep an eye out for humble bundles - often you can get ~10 ebooks for $15.