Skip to content
Maestro

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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

  1. Your first program

    1. Welcome: from notebooks to real programsreference
    2. The interpreter, the editor and the terminal
    3. Scripts aren't notebooks
    4. Run your code: in the app, or on your own machine
    5. Print what you mean
  2. Values and names

    1. Values, types and names
    2. Numbers and converting types
    3. Strings and f-strings
    4. Conditions: comparisons, == vs = and truthiness
    5. Indentation and if/elif/else
  3. Collections

    1. Lists
    2. Tuples and unpacking
    3. Dicts and sets
    4. Two names, one list: mutability
    5. Nested, JSON-shaped data
    6. Choosing a collection
  4. Loops

    1. for loops and accumulators
    2. range, enumerate, zip and while
    3. Comprehensions
    4. Loops vs vectorized pandas and SQL
  5. Functions

    1. Objects, methods and function calls
    2. Writing functions: def and return
    3. Default arguments and scope
    4. Turn copy-paste into functions
    5. Type hints and docstrings
    6. Functions as values, and decorators
  6. Errors and your own objects

    1. Reading tracebacks and common errors
    2. try, except and raise
    3. Classes and self
    4. Dataclasses
    5. Subclassing a framework's class
  7. Files, modules and the standard library

    1. Imports and the standard library
    2. Files and paths
    3. JSON
    4. Your own modules and __main__
    5. Configuration and secrets in environment variables
  8. From script to project

    1. Packages and environments with uv
    2. Recording dependencies
    3. Import errors and "it works in my notebook"
    4. Reading code you didn't write
    5. Notebook, script or module?
    6. Capstone: a small multi-file program
    7. 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.