Part 2 — Tools and Setup · 5 min read
Python Without Fear
A simple explanation of Python as a tool for data and machine learning.
If the word "Python" in this book's title made you a little uneasy, you're not alone. Many people picked up this book precisely because they don't code — and the idea of a programming language can feel like a wall standing between you and your data.
It isn't. This chapter will show you what Python actually is, how little of it you truly need for this book, and why you were never expected to become a software engineer to use it.
What Python Actually Is
Python was created by a Dutch programmer named Guido van Rossum, who began working on it in December 1989 and released it publicly in 1991. He wanted a language that was powerful enough for real work, but readable enough that the code almost explained itself. That goal shaped everything about how Python looks and feels today.
Python is what's called a scripting language. In practice, this means you don't need a separate step to prepare your code before running it — no compiling, no building, none of the extra machinery some older languages require. You write a line, you run it, and you see what happens. That immediacy is part of why Python feels approachable: the gap between writing something and seeing a result is as short as possible.
Python has also become the most widely used language in the world of data science and machine learning. That's not an accident — it was shaped, over decades, by exactly the kind of people this book is written for: researchers, analysts, and domain experts who needed a tool for working with data, not a tool for building software from scratch. When you use Python for machine learning, you're using it the way most of the field already does.
How Much Python Do You Actually Need for This Book?
Here's the honest boundary: this book will ask you to understand a small, fixed set of things. Loading a table of data. Changing a few values or settings. Running an experiment and looking at the result. That's close to the ceiling.
You will not need to understand loops, classes, or the deeper mechanics of software design. Those are real parts of Python, and they matter if you're building software — but they are not what this book is about, and you can go a long way in AutoML without ever touching them.
Think of it the way we described AutoML itself back in Chapter 2: you don't need to understand everything under the hood to drive well. The same is true here. You need enough Python to read what's happening, adjust a few things with confidence, and know what a line of code is doing before you run it. That's a much shorter list than most people expect.
A First Look at Python
Before looking at any actual code, one word is worth knowing: library. A library is a collection of code that someone else has already written and tested, so you don't have to build it yourself. Think of it as a toolbox — instead of forging your own hammer, you reach for one that's already sitting there, ready to use.
Python has thousands of libraries. This book will mainly use one called pandas, built for working with tables of data, and later, one called mljar-supervised, built for AutoML.
Here's a small, real example — three lines of Python that load a spreadsheet and take a first look at it:
import pandas as pd
data = pd.read_csv("insurance.csv")
print(data.head())Nothing here is mysterious once it's explained. The first line brings in the pandas library so we can use it. The second line loads a spreadsheet — in this case, a CSV file called insurance.csv — into Python. The third line shows the first few rows, much like scrolling to the top of a spreadsheet to see what you're working with.
Three lines, and Python is already reading your data. Most of what you'll do in this book follows the same shape: a small number of clear, readable lines, each doing one understandable thing.
There's More Than One Way to Write Python
You don't have to write Python in just one way. Some people type it into a plain text file and run the whole thing at once from a terminal. Others use notebooks, which let you run a few lines at a time and see the result immediately, right below the code. MLJAR Studio builds on that notebook idea and adds AI assistance on top, so you're rarely staring at a blank page wondering where to start.
We'll set one of these up properly in the next chapter. For now, it's enough to know that there's more than one comfortable path in, and you'll get to see how each one works before choosing where to begin.
Mistakes Are Normal, Not a Sign You're Doing It Wrong
At some point, you will run a piece of code and see red error text. This is not a sign that you've broken something, and it's not a sign you're bad at this. It happens to everyone who writes Python, no matter how experienced.
As we saw in Chapter 2, machine learning is experimental by nature — you try something, look at the result, and adjust. Writing Python works the same way. An error message is usually just Python telling you, quite precisely, what it didn't understand — a misspelled column name, a missing file, a small typo. Read it, fix the one thing it's pointing at, and try again.
Chapter Summary
Python was built to be readable, and that design choice is exactly why it became the standard language for data science and machine learning. This book only asks for a small, bounded slice of it — enough to load data, adjust a few settings, and run an experiment, nothing more.
There's more than one comfortable way to write Python, and errors along the way are a normal part of the process, not a verdict on your ability.
In the next chapter, we'll set up a real place to write and run Python — scripts, notebooks, and MLJAR Studio — so you can start experimenting for real.
Would you like to follow the book as it grows?
Subscribe through a short Google Form and we'll let you know when a new chapter is ready.