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.
|Fluent Python: Clear, Concise, and Effective Programming
|Grokking Algorithms An Illustrated Guide For Programmers and Other Curious People
||Aditya Y. Bhargava
|Deep Learning with Python
|Hands-On Machine Learning with Scikit-Learn and TensorFlow
|Automate the Boring Stuff with Python: Practical Programming for Total Beginners
|Python Crash Course: A Hands-On, Project-Based Introduction to Programming
|Python for Data Analysis
|Effective Python: 59 Specific Ways to Write Better Python
|Python Machine Learning
|Python Data Science Handbook: Tools and Techniques for Developers
|Introduction to Machine Learning with Python: A Guide for Data Scientists
||Andreas C. Müller
|Python for Everybody: Exploring Data in Python 3
|Learn Python The Hard Way
||Zed A. Shaw
|Flask Web Development: Developing Web Applications with Python
|Data Science from Scratch: First Principles with Python
|Test-Driven Web Development with Python
|Black Hat Python: Python Programming for Hackers and Pentesters
|Python Pocket Reference
|Introducing Python: Modern Computing in Simple Packages
|A Common-Sense Guide to Data Structures and Algorithms: Level Up Your Core Programming Skills
|Head First Python
|Python Testing with Pytest: Simple, Rapid, Effective, and Scalable
||Allen B. Downey
|The Self-Taught Programmer: The Definitive Guide to Programming Professionally
|Serious Python: Black-Belt Advice on Deployment, Scalability, Testing, and More
|Feature Engineering for Machine Learning
|Impractical Python Projects: Playful Programming Activities to Make You Smarter
|Python Flash Cards: Syntax, Concepts, and Examples
|High Performance Python: Practical Performant Programming for Humans
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:
Automate the Boring Stuff with Python: Practical Programming for Total Beginners by Al Sweigart (4.28 avg, 1,432 ratings)
Python Crash Course: A Hands-On, Project-Based Introduction to Programming by Eric Matthes (4.35 avg, 976 ratings)
Learning Python by Mark Lutz (3.96 avg, 1,976 ratings)
Grokking Algorithms An Illustrated Guide For Programmers and Other Curious People by Aditya Y. Bhargava (4.41 avg, 1,576 ratings)
Python for Data Analysis by Wes McKinney (4.13 avg, 1,226 ratings)
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...