Python for Data People: From Notebooks to Real Programs
Write, run and organize real Python programs, and be ready to start building data apps and APIs.
You go at your own pace, with your Maestro beside you, 1:1, through the whole course. Open it from the page you're on and ask it anything; it asks you questions too.
63 skills · 8 modules
$25
Comes with your Maestro, 1:1, for the whole course.
What you'll be able to do
Each box is a skill. The base is at the bottom, recognizing and explaining, and you work your way up to building something of your own and judging what works and why. Hover over a box to see what it builds on. Click it to see where I teach it and how your Maestro checks it.
- Evaluate
- Synthesize
- Analyze
- Apply
- Understand
- Remember
Evaluate
Choose a list, tuple, dict or set for a job and justify the choice
Where I teach it: Collections · Choosing a collection
Builds on:
- Create, index, slice and change lists (append, insert, remove, sort)
- Use tuples for fixed groups of values and unpack them into separate names
- Create, read, update and loop over dictionaries by key
- Use sets to remove duplicates and test membership
- Explain mutability: which types can change in place (list, dict, set) and which cannot (int, str, tuple)
Your Maestro asks you to judge when it fits and why and saves it as evidence when you do.
Choose whether a piece of work belongs in a notebook, a script or a module, and justify the choice
Where I teach it: From script to project · Notebook, script or module?
Builds on:
- Explain how a script differs from a notebook: it runs top to bottom in a fresh process every time, with no hidden state from earlier cells
- Split a program into your own modules and import between them
- Diagnose why code that works in a notebook fails as a script: a different interpreter, a missing package or another working directory
Your Maestro asks you to judge when it fits and why and saves it as evidence when you do.
Synthesize
Design a small multi-file program (functions, your own module, a main entry point and its own environment) that solves a stated problem
Where I teach it: From script to project · Capstone: a small multi-file program
Builds on:
- Turn repeated, copy-pasted code into a reusable function with clear parameters
- Split a program into your own modules and import between them
- Use if __name__ == "__main__" to separate a module's reusable code from what runs as a script
- Create a virtual environment for a project and install packages into it
- Handle an expected error with try/except, catching a specific exception rather than everything
- Record a project's dependencies (pyproject.toml or requirements.txt) so someone else can recreate its environment
Your Maestro asks you to build something of your own with it and saves it as evidence when you do.
Analyze
Predict when two names share one mutable object, so a change made through one name shows up through the other
Where I teach it: Collections · Two names, one list: mutability
Builds on:
- Explain mutability: which types can change in place (list, dict, set) and which cannot (int, str, tuple)
- Explain that a variable is a name bound to an object, not a box that holds a value
- Create, index, slice and change lists (append, insert, remove, sort)
Your Maestro asks you to break a problem down with it and saves it as evidence when you do.
Compare a Python loop with a vectorized DataFrame or SQL operation and explain why the loop handles one item at a time
Where I teach it: Loops · Loops vs vectorized pandas and SQL
Builds on:
- Build up a result inside a loop with an accumulator: a running total, a growing list or a dict of counts
Your Maestro asks you to break a problem down with it and saves it as evidence when you do.
Diagnose a failing program from its traceback and the common error types (NameError, TypeError, KeyError, IndexError, AttributeError)
Where I teach it: Errors and your own objects · Reading tracebacks and common errors
Builds on:
- Read a traceback from the bottom up to find the error type, its message and the line that raised it
- Create, index, slice and change lists (append, insert, remove, sort)
- Create, read, update and loop over dictionaries by key
- Explain that every value is an object with a type, attributes and methods reached with a dot
Your Maestro asks you to break a problem down with it and saves it as evidence when you do.
Diagnose why code that works in a notebook fails as a script: a different interpreter, a missing package or another working directory
Where I teach it: From script to project · Import errors and "it works in my notebook"
Builds on:
- Create a virtual environment for a project and install packages into it
- Explain how a script differs from a notebook: it runs top to bottom in a fresh process every time, with no hidden state from earlier cells
- Diagnose a ModuleNotFoundError by tracing where Python looks for an import: the script's folder, then the active environment's packages
- Build file paths with pathlib and resolve relative paths against the working directory
Your Maestro asks you to break a problem down with it and saves it as evidence when you do.
Diagnose a ModuleNotFoundError by tracing where Python looks for an import: the script's folder, then the active environment's packages
Where I teach it: From script to project · Import errors and "it works in my notebook"
Builds on:
- Import modules, names from modules and aliases, and explain the namespace each import creates
- Split a program into your own modules and import between them
- Read a traceback from the bottom up to find the error type, its message and the line that raised it
- Explain what a package, a package installer (pip or uv) and a virtual environment are, and why each project gets its own environment
Your Maestro asks you to break a problem down with it and saves it as evidence when you do.
Describe in plain language what an unfamiliar Python script does, function by function
Where I teach it: From script to project · Reading code you didn't write
Builds on:
- Define a function with def, parameters and a return value
- Repeat work over each item of a collection with a for loop
- Branch a program with if, elif and else
- Import modules, names from modules and aliases, and explain the namespace each import creates
Your Maestro asks you to break a problem down with it and saves it as evidence when you do.
Apply
Run a Python script from the terminal and read the output it prints
Where I teach it: Your first program · Run your code: in the app, or on your own machine
Builds on:
- Distinguish the Python interpreter that runs code, the editor where you write it and the terminal where you start it
- Explain that the Python interpreter reads a program's text and runs it statement by statement, top to bottom
Your Maestro asks you to use it on a new case and saves it as evidence when you do.
Display values in a script with print(), knowing a script shows nothing a notebook would have displayed automatically
Where I teach it: Your first program · Print what you mean
Builds on:
- Run a Python script from the terminal and read the output it prints
- Explain how a script differs from a notebook: it runs top to bottom in a fresh process every time, with no hidden state from earlier cells
Your Maestro asks you to use it on a new case and saves it as evidence when you do.
Assign and reassign variables and predict what each name refers to after every line
Where I teach it: Values and names · Values, types and names
Builds on:
- Explain that a variable is a name bound to an object, not a box that holds a value
- Name Python's core value types (int, float, str, bool, None) and recognize each in code
Your Maestro asks you to use it on a new case and saves it as evidence when you do.
Compute with arithmetic operators (including /, // and %) and convert between types with int(), float() and str()
Where I teach it: Values and names · Numbers and converting types
Builds on:
- Name Python's core value types (int, float, str, bool, None) and recognize each in code
- Assign and reassign variables and predict what each name refers to after every line
Your Maestro asks you to use it on a new case and saves it as evidence when you do.
Work with strings: index and slice them, call common string methods and build text with f-strings
Where I teach it: Values and names · Strings and f-strings
Builds on:
- Name Python's core value types (int, float, str, bool, None) and recognize each in code
- Assign and reassign variables and predict what each name refers to after every line
Your Maestro asks you to use it on a new case and saves it as evidence when you do.
Write comparisons and combine them with and, or and not, telling = (assignment) apart from == (equality)
Where I teach it: Values and names · Conditions: comparisons, == vs = and truthiness
Builds on:
- Name Python's core value types (int, float, str, bool, None) and recognize each in code
- Assign and reassign variables and predict what each name refers to after every line
Your Maestro asks you to use it on a new case and saves it as evidence when you do.
Understand
Distinguish the Python interpreter that runs code, the editor where you write it and the terminal where you start it
Where I teach it: Your first program · The interpreter, the editor and the terminal
Builds on:
- Explain that the Python interpreter reads a program's text and runs it statement by statement, top to bottom
Your Maestro asks you to explain it in your own words and saves it as evidence when you do.
Explain that the Python interpreter reads a program's text and runs it statement by statement, top to bottom
Where I teach it: Your first program · The interpreter, the editor and the terminal
Your Maestro asks you to explain it in your own words and saves it as evidence when you do.
Explain how a script differs from a notebook: it runs top to bottom in a fresh process every time, with no hidden state from earlier cells
Where I teach it: Your first program · Scripts aren't notebooks
Builds on:
- Explain that the Python interpreter reads a program's text and runs it statement by statement, top to bottom
- Distinguish the Python interpreter that runs code, the editor where you write it and the terminal where you start it
Your Maestro asks you to explain it in your own words and saves it as evidence when you do.
Explain that a variable is a name bound to an object, not a box that holds a value
Where I teach it: Values and names · Values, types and names
Builds on:
- Name Python's core value types (int, float, str, bool, None) and recognize each in code
Your Maestro asks you to explain it in your own words and saves it as evidence when you do.
Explain truthiness: which values count as false in a condition (0, empty string, empty list, None) and why it matters
Where I teach it: Values and names · Conditions: comparisons, == vs = and truthiness
Builds on:
- Name Python's core value types (int, float, str, bool, None) and recognize each in code
Your Maestro asks you to explain it in your own words and saves it as evidence when you do.
Explain that indentation, not braces or keywords, defines which lines belong to a block
Where I teach it: Values and names · Indentation and if/elif/else
Builds on:
- Explain that the Python interpreter reads a program's text and runs it statement by statement, top to bottom
Your Maestro asks you to explain it in your own words and saves it as evidence when you do.
Remember
Name Python's core value types (int, float, str, bool, None) and recognize each in code
Where I teach it: Values and names · Values, types and names
Your Maestro asks you to recognize and recall it and saves it as evidence when you do.
What we'll cover
Your first program
- Welcome: from notebooks to real programsreference
- The interpreter, the editor and the terminal
- Scripts aren't notebooks
- Run your code: in the app, or on your own machine
- Print what you mean
Values and names
- Values, types and names
- Numbers and converting types
- Strings and f-strings
- Conditions: comparisons, == vs = and truthiness
- Indentation and if/elif/else
Collections
- Lists
- Tuples and unpacking
- Dicts and sets
- Two names, one list: mutability
- Nested, JSON-shaped data
- Choosing a collection
Loops
- for loops and accumulators
- range, enumerate, zip and while
- Comprehensions
- Loops vs vectorized pandas and SQL
Functions
- Objects, methods and function calls
- Writing functions: def and return
- Default arguments and scope
- Turn copy-paste into functions
- Type hints and docstrings
- Functions as values, and decorators
Errors and your own objects
- Reading tracebacks and common errors
- try, except and raise
- Classes and self
- Dataclasses
- Subclassing a framework's class
Files, modules and the standard library
- Imports and the standard library
- Files and paths
- JSON
- Your own modules and __main__
- Configuration and secrets in environment variables
From script to project
- Packages and environments with uv
- Recording dependencies
- Import errors and "it works in my notebook"
- Reading code you didn't write
- Notebook, script or module?
- Capstone: a small multi-file program
- What's next: from programs to appsreference
Your Maestro knows this course
- It always knows which page you're on.
- It works from the skills I picked for this course, the ones on the map above.
- Ask it how you're doing, and it tells you what you've already shown and what comes next.
What you get
- 8 modules and 43 pages, open whenever you want them.
Your Maestro for the whole course, who knows every lesson and what you've already shown it. You open it from the page you're on.
Who's teaching you
Sergio Sánchez
I'm Sergio, chekos online. I've worked with data for about ten years, mostly at mission-driven organizations: policy research first, then education, and now early childhood services. In 2018 I started tacosdedatos to share what I was learning, and since then it's been a blog, a podcast, courses, guides, and a community. These days I spend a lot of my time building with AI agents and writing about how I organize my work around them. I share what I've learned; you take what's useful and make it yours.
See you in the course
Python for Data People: From Notebooks to Real Programs
$25
Comes with your Maestro, 1:1, for the whole course.