Part 2 — Tools and Setup · 6 min read
Scripts, Notebooks, and MLJAR Studio
Different ways to work with Python — scripts, notebooks, and MLJAR Studio.
In the last chapter, we said there's more than one comfortable way to write Python — some people use plain scripts, others use notebooks, and MLJAR Studio builds on the notebook idea with AI assistance layered on top. It's time to actually look at all three, so you can see exactly what you're walking into before we install anything in the next chapter.
The Terminal, Briefly
Every computer — Windows, macOS, Linux — has a terminal: a plain text window where you type instructions instead of clicking on things. It looks old-fashioned, but it's still one of the most direct ways to tell a computer what to do.
You don't need to become comfortable living in a terminal to use this book. You just need to recognize one when you see it, because it shows up briefly in the next section. Here's what it looks like on each system, running the same simple command:



Different operating system, same idea: a place to type a line, press Enter, and see what comes back.
Writing and Running a Script
The most basic way to work with Python is a script — a plain text file, saved with a .py extension, containing the lines of Python you want to run.
Writing a script is a two-step process. First, you write the code and save it as a file — for example, myfile.py. Then, you run that file from a terminal, and Python reads it from top to bottom, one line at a time, and shows you the result.

This works well when you already know exactly what you want the code to do, start to finish, and you just want to run the whole thing at once. It's less convenient when you're still exploring — figuring out what your data looks like, trying something, adjusting it, and trying again. For that kind of work, most people reach for something different.
Notebooks: A Different Way to Work
A notebook is a document made up of small pieces, called cells. Each cell can hold a bit of Python code, and when you run it, the result — a table, a chart, a number — appears immediately underneath, right there in the same document.

This changes how you work. Instead of writing an entire script and running the whole thing at once, you can run one small piece, look at what happened, and decide what to try next — one step at a time, with the results always visible. For exploring a new dataset, that back-and-forth is a much better fit than a script, where you'd need to rerun the whole file just to check one thing.
Where MLJAR Studio Fits In
MLJAR Studio is a notebook-based environment built specifically for data science and AI-assisted analysis. It gives you the same cell-by-cell way of working as a regular notebook, with two things added on top.
The first is AI assistance built directly into the notebook — so instead of always starting from a blank cell, you can describe what you want and get a starting point for the code, then read it, adjust it, and run it yourself.
The second is that it runs locally, entirely on your own computer. There's no separate server involved in running your notebook or your code — because of that, your data isn't uploaded anywhere as part of using it.

This is the environment we'll use for the hands-on parts of this book.
Which One Should You Use for This Book?
Each of these three has a job it's good at. Scripts are well suited to repeatable, automated work — something you'll run the same way again and again, perhaps as part of a larger system. Notebooks are well suited to exploring — understanding a new dataset, trying something out, seeing what happens. MLJAR Studio takes that same notebook approach and adds AI assistance and local, private execution on top of it, which is exactly the kind of work this book is built around.
For the projects in this book, we'll use MLJAR Studio. You're welcome to follow along in a plain notebook instead if you prefer — the Python itself will look the same either way.
A Small Example, Three Ways
To make the differences concrete, here's the same three lines of Python from Chapter 5, shown in all three environments.
import pandas as pd
data = pd.read_csv("insurance.csv")
print(data.head())As a script, this would be saved as a file and run from the terminal, with the output appearing below the command you typed. In a notebook, it would sit in a single cell, with the output appearing directly underneath that cell. In MLJAR Studio, it looks much the same as the notebook version — but you could have also arrived at this code by describing what you wanted, with the AI assistant writing a first draft for you to check and run.

Same code. Same result. Three different comfortable ways to get there.
Chapter Summary
Python can be written as a plain script and run from a terminal, explored one step at a time in a notebook, or worked through in MLJAR Studio, which adds AI assistance and local, private execution on top of the notebook idea. None of these is more "real" than the others — they're suited to different kinds of work.
For this book, we'll use MLJAR Studio, since it fits the kind of iterative, exploratory work AutoML projects usually involve.
In the next chapter, we'll get it installed, so you can start running real code on your own computer.
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.