DEV Community


Posted on • Originally published at

Best Books for Learning Python in 2021

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.

title author average_rating ratings_count publish_date
Fluent Python: Clear, Concise, and Effective Programming Luciano Ramalho 4.66 777 2015-01-25
Grokking Algorithms An Illustrated Guide For Programmers and Other Curious People Aditya Y. Bhargava 4.41 1,576 2015-01-01
Deep Learning with Python Francois Chollet 4.64 680 2018-12-04
Hands-On Machine Learning with Scikit-Learn and TensorFlow Aurélien Géron 4.55 651 2017-04-09
Automate the Boring Stuff with Python: Practical Programming for Total Beginners Al Sweigart 4.28 1,432 2014-11-25
Python Crash Course: A Hands-On, Project-Based Introduction to Programming Eric Matthes 4.35 976 2015-02-25
Python for Data Analysis Wes McKinney 4.13 1,226 2011-12-30
Learning Python Mark Lutz 3.96 1,976 2013-07-24
Effective Python: 59 Specific Ways to Write Better Python Brett Slatkin 4.29 630 2015-02-01
Python Machine Learning Sebastian Raschka 4.27 411 2015-09-23
Programming Python Mark Lutz 3.98 848 1996-08-01
Python Data Science Handbook: Tools and Techniques for Developers Jake Vanderplas 4.32 285 2016-03-25
Introduction to Machine Learning with Python: A Guide for Data Scientists Andreas C. Müller 4.34 257 2015-06-25
Python for Everybody: Exploring Data in Python 3 Charles Severance 4.31 256 2016-07-10
Python Cookbook David Beazley 4.16 374 2002-07-15
Learn Python The Hard Way Zed A. Shaw 3.87 881 2010-01-01
Flask Web Development: Developing Web Applications with Python Miguel Grinberg 4.19 302 2014-04-28
Data Science from Scratch: First Principles with Python Joel Grus 3.93 552 2015-04-14
Test-Driven Web Development with Python Harry Percival 4.21 237 2010-01-01
Black Hat Python: Python Programming for Hackers and Pentesters Justin Seitz 4.04 319 2014-11-25
Python Pocket Reference Mark Lutz 4.00 307 1998-03-15
Introducing Python: Modern Computing in Simple Packages Bill Lubanovic 4.21 170 2013-11-22
A Common-Sense Guide to Data Structures and Algorithms: Level Up Your Core Programming Skills Jay Wengrow 4.22 160 2017-08-22
Head First Python Paul Barry 3.83 320 2010-01-01
Python Testing with Pytest: Simple, Rapid, Effective, and Scalable Brian Okken 4.06 119 2017-10-25
Think Stats Allen B. Downey 3.63 315 2011-01-01
The Self-Taught Programmer: The Definitive Guide to Programming Professionally Cory Althoff 4.00 71 2017-01-24
Serious Python: Black-Belt Advice on Deployment, Scalability, Testing, and More Julien Danjou 4.03 64 2018-12-01
Feature Engineering for Machine Learning Alice Zheng 3.81 80 2018-04-10
Impractical Python Projects: Playful Programming Activities to Make You Smarter Lee Vaughan 4.24 31 2018-11-27
Python Flash Cards: Syntax, Concepts, and Examples Eric Matthes 4.08 12 2019-01-15
High Performance Python: Practical Performant Programming for Humans Micha Gorelick 4.17 7 2013-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.

My other recommendation for beginners is to keep an eye out for bundle deals, like humble bundle. You can normally get ~10 ebooks for $15. Which is a pretty good deal, given a lot of these books go for $30+ on their own...

Top comments (0)