The world’s leading publication for data science, AI, and ML professionals.

3 Programming Books Every Data Scientist Must Read

Master the programming aspect of data science with Python

Practical data science is more about programming than it is about math. Python is the language of choice for the majority, so it’s essential to master non-data-science aspects of the language. Today we’ll talk about 3 essential books to do just that.

Photo by Priscilla Du Preez on Unsplash
Photo by Priscilla Du Preez on Unsplash

But why is it important to master programming as a data scientist? Well, I’ll take my chances and say you’ll work for a company with other software developers, so it’s essential to know how your role fits into a bigger picture.

Let’s quickly elaborate on that.

Most data scientists work inside a company that offers some product/service, which is developed primarily by the software development team. The role of a data scientist is to extend the functionality of the mentioned product/service with, well, data analysis or predictive modeling of some sort.

Knowing how to train a machine learning model in a notebook just won’t make the cut. Also, knowing the basics of software development also isn’t enough for efficient work with the software development department.

You need to know how to write simple, readable, and efficient code, and also know how to organize it in an optimal way.

That’s where more advanced programming concepts come into play – topics such as data structures, algorithms, design patterns, and interview questions – which aren’t necessarily tied just to interviews. But more on that later.

Please keep in mind – in the article, you’ll find affiliate links to my top recommended books. That doesn’t mean anything to you, as the price is identical, but I’ll get a small commission if you decide to make a purchase. Also, I included only the books I’ve gone through personally and can guarantee 100% for the quality.

Okay, let’s start with the first one.


Hands-On Data Structures and Algorithms with Python

https://amzn.to/3zXJ57I
https://amzn.to/3zXJ57I

If you’re serious about your programming endeavors, learning data structures and algorithms is a must.

It’s one of those concepts for which you don’t understand the point at first, but once you go through the materials everything changes. You’ll learn just how elegant the code can be when written efficiently and also get introduced to answers on some of the most common interview questions.

This is the go-to book for learning data structures and algorithms in the Python programming language, and it covers topics like built-in data types, data types from the collections module, singly and doubly linked lists, stacks, queues, trees and tree traversal, hash tables, graphs, searching and sorting algorithms, and much more.

There are a lot of resources online to learn these topics, but I’ve found this book pretty good for the price. It’s about 400 pages long, so don’t expect to complete it any time soon. Devote at least 2 months to it, as the topics are fairly complex.

You can get the book here.


Mastering Python Design Patterns

https://amzn.to/3GsYU97
https://amzn.to/3GsYU97

Think of design patterns as a set of best practices you can use to solve a particular problem when designing an application.

This book will teach you how to structure your code. Staying inside notebooks isn’t a solution for production environments, so learning how to properly structure your code is a must – even if you’re not writing applications (in a traditional sense).

The book covers a vast majority of design patterns, such as abstract factory pattern, builder pattern, adapter pattern, decorator pattern, bridge pattern, facade pattern, command pattern, observer pattern, and many more.

Those are divided into sections to make learning logical and easy, and the main sections are creational patterns, structural patterns, and behavioral patterns.

It’s only about 250 pages so it shouldn’t take you that long to finish. Once again, this is not the simplest of topics, so take your time and don’t rush things.

You can get the book here.


Elements of Programming Interviews In Python

https://amzn.to/3GA5qLq
https://amzn.to/3GA5qLq

Yet another awesome book. If you’ve read the first one from the list – Hands-On Data Structures and Algorithms With Python – you may find this one a bit similar. That’s not a bad thing at all. Let me elaborate.

You need to learn data structures and algorithms well, and repeating the concepts you’ve learned months ago is nothing but beneficial. Also, you should learn or at least skim over some of the most common coding interview questions.

Why? Because chances are some of these will occur during your job interview. You’re expected to know this stuff, even though it’s not directly tied to Data Science. It sucks, I know.

That’s how things are with data science – a ton of prerequisites required by the interviewers, of which you’ll use 5% on the job. Maybe. But it is what it is.

You can get the book here.


Before you go

Programming and software engineering is much broader than one might think. It’s not enough to learn how to write code, as we must aim for the simplest and the most efficient solution.

These books are my recommended way to take your Python skills to the top level. If you’re a Python beginner, here’s an article you should read:

Here’s how I Learned Just Enough Programming for Data Science

Thanks for reading, I hope you’ve liked it.

Join my private email list for more helpful insights.


Loved the article? Become a Medium member to continue learning without limits. I’ll receive a portion of your membership fee if you use the following link, with no extra cost to you.

Join Medium with my referral link – Dario Radečić


Related Articles