Chapter 1 — Welcome & Getting Set Up
Lesson 1.1 — Why Python, Why You
Let me tell you about a Monday morning.
A data engineer walks into work. Overnight, a client sent a file with yesterday's sales numbers. It's supposed to load into the company's database automatically, ready for the morning report. But this morning, the report is empty.
She opens the file. It's a mess. Some rows have prices written as "24.99" with quotes around them. Some rows are missing a country code. One row, somehow, has the date written three different ways in three different columns.
Now, she could open this file in Excel and start fixing things by hand. Row by row. Column by column. It would take her the whole morning. And tomorrow, the same file will show up again, just as messy.
Instead, she opens her laptop, writes about fifteen lines of Python, and lets the computer do it. Ninety seconds later, the file is clean, the report is fixed, and she's on to her next task before her coffee gets cold.
That fifteen lines of code — that's what this course is about.
You don't need to be a "programmer" in the way movies show it. No hoodies, no hacking, no genius-only club. Data engineering runs on a few core skills used again and again: reading files, cleaning messy values, checking your work, and repeating the process reliably every single day. Python is simply the tool that lets you do all of that without doing it by hand.
Here's the honest truth: everyone in this field started exactly where you're starting. The difference between someone who's "good at Python" and someone who isn't, yet, is just time spent practicing the basics until they become automatic. That's what these next few weeks are for.
By the end of this course, you won't know everything about Python. Nobody does. But you'll be able to open a messy file, clean it, check that your cleaning actually worked, and trust your own code enough to move on to the next task — without that nagging feeling of "did I do this right?"
Let's get your computer ready, and write the first line together.
Try It Yourself: Before the next lesson, open a blank note and write down one repetitive, annoying task you've done by hand before — in Excel, in a spreadsheet, anywhere. Copying data. Renaming files. Checking for duplicates. Keep it in mind. By the end of this course, you'll know how to make Python do it for you.
Lesson 1.2 — Installing Python & Your Code Editor
Before we write any code, we need two things on your computer: Python itself, and a place to write it. Let's set both up, step by step. Don't rush this — a solid setup now saves you frustration for the entire course.
First, Python.
Python is free, and it runs on Windows, Mac, and Linux the same way.
- Go to
python.org/downloads - Click the big download button — it will detect your operating system automatically
- Run the installer
- One important thing on Windows: there's a checkbox during installation that says "Add Python to PATH." Tick that box. If you skip it, your computer won't know where to find Python later, and we'll have to fix it.
Once it's installed, let's prove it worked. Open your computer's terminal — on Mac, that's the Terminal app; on Windows, that's Command Prompt or PowerShell. Type this and press Enter:
bashpython --version
You should see something like Python 3.12.x. If you see a version number, you're set. If you see an error instead, don't panic — this is the single most common hiccup in any Python course, and it's almost always the PATH checkbox. We'll troubleshoot it together in the course community if you get stuck.
Now, your code editor.
Think of this like the difference between a plain notepad and a proper workshop desk with all your tools laid out. You can write Python in Notepad. You won't want to.
We'll use Visual Studio Code — VS Code for short. It's free, it's what most working data engineers actually use day to day, and it has a few built-in helpers that will make your life much easier as you learn.
- Go to
code.visualstudio.com - Download and install it for your operating system
- Open it once it's installed
One more small step: inside VS Code, click the square icon on the left sidebar (it looks like four blocks) — that's the Extensions panel. Search for "Python" and install the official extension published by Microsoft. This gives VS Code the ability to understand and run Python code, and it'll catch simple mistakes for you as you type, before you even run anything.
That's it. Python is installed, and you have a proper place to write it.
Try It Yourself:
- Confirm
python --versionworks in your terminal. - Open VS Code and confirm the Python extension is installed (you'll see a small Python logo in the bottom status bar once you open a
.pyfile). - Create a new folder on your computer called
python-de-foundations. This is where all your work for this course will live. Open that folder in VS Code using File → Open Folder.
We're ready. Let's write your first program.
Lesson 1.3 — Your First Program
Every data engineer's very first program does the same thing: it says hello. It's a small tradition, and there's a good reason for it — it proves your whole setup actually works, end to end, before you build anything real on top of it.
Inside VS Code, inside the python-de-foundations folder you created, make a new file. Call it hello.py. The .py at the end is important — that's how your computer knows this file contains Python code.
Type this into the file:
pythonprint("Hello, Data Engineer")
Now let's run it. In VS Code, you can right-click anywhere inside the file and choose "Run Python File in Terminal." A terminal panel will open at the bottom, and in a second, you'll see your message printed out.
Output / NoteHello, Data Engineer
That word, print, is a function — a built-in command that tells Python "show this on the screen." You'll use print constantly, not just for saying hello, but for checking what your code is actually doing while you're building it. It's your window into what's happening inside your program.
Now, let's break it. On purpose. This matters more than it sounds like it should.
Delete one of the closing quotation marks, so the line looks like this:
pythonprint("Hello, Data Engineer)
Run it again. You'll get red text — an error message, something like SyntaxError: unterminated string literal.
Here's the thing I want you to take from this: that red text is not scary, and it's not your enemy. It's Python trying to help you. It's telling you exactly what's wrong and roughly where. Reading error messages calmly, instead of panicking at the red text, is one of the most useful habits you'll build in this entire course. You'll see plenty more of them — everyone does, every single day, even senior engineers with ten years of experience.
Fix the quotation mark, run it again, and watch it work.
You've now done the entire loop that you'll repeat thousands of times in this career: write code, run it, read what happened, fix it if needed. That loop is the whole job, really, just with bigger and more interesting problems each time.
Try It Yourself:
- In the same
hello.pyfile, add a second line that prints your name, likeprint("Written by [your name]"). - Add a comment above it — a line starting with
#— explaining what the file does. Comments are ignored by Python; they're notes for humans. Example:# This is my very first Python script. - Run the file again and confirm both lines print correctly.