Python
Idioms, the standard library tricks I keep forgetting, and what's new in the language.
-
Lesson 1
Python in 2026: what's changed, what's stable, what's coming
Where Python is right now — language features, the ecosystem shift to uv, JIT, free-threading, and what to actually care about as a working developer.
-
Lesson 2
Type hints aren't optional anymore
How to write modern Python with type hints — for your own benefit, for IDE help, and because every code review now expects them.
-
Lesson 3
f-strings, walrus, match — the new flow-control idioms
Modern Python syntax that makes code clearer than the alternatives — when to use each, and the cases where the old way is still better.
-
Lesson 4
Iterators, generators, comprehensions — pulling them apart
Three related concepts that most Python writers blur together. The differences matter when memory matters and when laziness matters.
-
Lesson 5
Decorators, demystified
Functions that wrap functions. The patterns you'll encounter daily, the pitfalls to know, and when to write your own.
-
Lesson 6
Context managers and the with-statement, beyond opening files
The protocol behind `with`, three ways to write your own, and when context managers beat try/finally.
-
Lesson 7
pathlib: filesystem paths the right way
Why os.path is legacy, what Path objects give you, and the small set of methods that cover 95% of real work.
-
Lesson 8
datetime + zoneinfo: the part everyone gets wrong
Naive vs aware datetimes, why timezones break in production, and the standard-library solution that finally arrived in 3.9.
-
Lesson 9
collections + dataclass: the small data structures you need
Counter, defaultdict, deque, namedtuple — and the dataclass that replaces all of them for most cases.
-
Lesson 10
itertools + functools: the higher-order toolkit
The two stdlib modules that turn loops into one-liners and turn one-liners into something readable. Plus when reduce is fine, despite the rumors.
-
Lesson 11
logging: structured logs, levels, and the patterns that work in production
Why print() doesn't scale, the logging module's reputation problem, and the configuration that makes it actually pleasant to use.
-
Lesson 12
Building CLIs: argparse, click, typer
The three CLI libraries you'll meet, when to pick each, and the typer pattern that's now winning.
-
Lesson 13
Virtual environments explained for humans
Why every Python project needs its own sandbox, what venv/poetry/uv actually do, and how to stop your projects from breaking each other.
-
Lesson 14
pyproject.toml: the one config file that replaces them all
Why setup.py is dead, what every section of pyproject.toml does, and the build backends behind it.
-
Lesson 15
uv: the 2026 ecosystem shift
Why uv replaced pip+venv+pyenv+poetry for many people, what it does differently, and the workflow.
-
Lesson 16
Project layout: src/ vs flat, where tests go, where scripts live
The layout decisions that affect imports, testing, and packaging — and the convention that's won in 2026.
-
Lesson 17
Dependency management: pip, poetry, uv — picking yours
The four real options, the trade-offs, and why most new projects in 2026 start with uv.
-
Lesson 18
Building and publishing: PyPI, internal artifact stores, semver
How to turn your project into a wheel, push it to PyPI or your company's index, and avoid the versioning footguns.
-
Lesson 19
pytest from zero to fixtures
Why pytest beat unittest, the basic test patterns, and the fixture system that makes test setup tolerable.
-
Lesson 20
Mocks, parametrize, conftest.py: the testing toolkit
Three pytest patterns that turn a 'this is impossible to test' situation into one paragraph of code.
-
Lesson 21
mypy / pyright + ruff: the static-analysis stack
Type checking for catching bugs, ruff for formatting and linting, and the workflow that runs both fast.
-
Lesson 22
Python code guidelines I actually use
PEP 8 in practice, the idioms that make Python code feel like Python, and the recent language features worth knowing about.
-
Lesson 23
AI-assisted Python development: the workflow that works
Where Copilot/Claude/Cursor genuinely help, where they hurt, and the prompt patterns that produce code you can ship.
-
Lesson 24
Property-based testing with hypothesis
Generate hundreds of test cases automatically. The patterns that find bugs unit tests miss.
-
Lesson 25
Pandas in 2026: what to know, what to skip, Polars rising
Where pandas sits in the 2026 data ecosystem, the PyArrow backend, and when Polars genuinely wins.
-
Lesson 26
Series and DataFrame: the data model
What pandas data structures actually are: an indexed array, and a dictionary of indexed arrays.
-
Lesson 27
Reading data: CSV, Parquet, Excel, JSON, SQL
The pd.read_* family, the gotchas in each format, and why Parquet is the format of choice in 2026.
-
Lesson 28
Selection: .loc, .iloc, boolean indexing
The three ways to slice a DataFrame, the differences, and the SettingWithCopyWarning everyone gets bitten by.
-
Lesson 29
Aggregation: groupBy, agg, transform, the right one for the job
GroupBy at scale, named aggregations, the difference between agg/apply/transform, and the patterns you'll use weekly.
-
Lesson 30
Joins: merge, concat, the patterns that don't surprise you
merge for joining tables, concat for stacking them, and the index-alignment behavior that's saved or ruined many an analysis.
-
Lesson 31
Reshape: pivot, melt, stack, unstack
Wide-to-long, long-to-wide, and when MultiIndex columns are a feature instead of a bug.
-
Lesson 32
Time series: resample, rolling, the date-time gotchas
DatetimeIndex, frequency conversion, rolling windows, and the timezone bugs that bite production.
-
Lesson 33
Categorical and string types: memory + speed wins
When converting a column to categorical or string[pyarrow] makes the difference between a job that runs and one that runs out of memory.
-
Lesson 34
When pandas is slow: chunks, dtypes, and where to look
The five biggest pandas performance levers, the diagnostic loop, and when 'rewrite in Polars' is the right answer.
-
Lesson 35
Polars: the modern alternative
What Polars does differently, the lazy API that makes it fast, and the syntax tour for pandas users.
-
Lesson 36
End-to-end data analysis project
Take a real dataset from raw CSV to a clean answer, in one script. The patterns that come up every time.
-
Lesson 37
ETL design: extract, transform, load
The pattern that defines half of all data engineering work, and the modern variations (ELT, medallion, lakehouse) you'll meet.
-
Lesson 38
Building an ingestion pipeline: files to database
A complete file-to-Postgres pipeline in Python, with the patterns that survive contact with reality.
-
Lesson 39
Working with APIs: requests, retries, rate limits
The HTTP toolbox in Python, the retry patterns that don't make things worse, and the rate-limit handling that keeps you welcome.
-
Lesson 40
asyncio: when async I/O actually pays
What asyncio buys you, the patterns that work, and the trap of mixing sync and async code.
-
Lesson 41
Orchestration: Airflow, Prefect, Dagster — the 2026 landscape
When cron isn't enough, what an orchestrator actually does, and the three contenders for your data pipelines.
-
Lesson 42
Data engineering project: build a real pipeline
From source to destination, with monitoring, idempotency, and a schedule. The lessons of Module 7 made tactile.
-
Lesson 43
NumPy: arrays, broadcasting, the foundation of scientific Python
What an ndarray is, why broadcasting changes how you write loops, and the small set of functions that cover most use cases.
-
Lesson 44
Plotting: matplotlib, seaborn, plotly — picking yours
Three plotting libraries, three philosophies, and which one to reach for given the audience.
-
Lesson 45
SciPy: the toolbox most people forget about
Statistics, optimization, signal processing, sparse matrices — the standard library of scientific Python.
-
Lesson 46
The Python features I learned too late
Match statements, the walrus operator, f-string debugging, dataclasses, and other Python features that would have saved me hours if I'd known about them sooner.
-
Lesson 47
Jupyter, notebooks, and when to leave them
Why notebooks are addictive, where they shine, and the moment you should stop and write a real script.
-
Lesson 48
Numerical project: a real analysis
Take a public dataset and run a complete numerical analysis: descriptive stats, fits, hypothesis tests, plots.
-
Lesson 49
scikit-learn: the standard ML library tour
The fit/predict pattern that underpins everything, the model categories, and the pipelines that make code reproducible.
-
Lesson 50
Feature engineering: the part that matters most
The transforms that turn raw data into model fuel — and the ones that quietly leak information from the future.
-
Lesson 51
Tree-based models: random forest, XGBoost, LightGBM
Why trees dominate tabular ML, the differences between the three big libraries, and the hyperparameters that matter.
-
Lesson 52
Linear and regularized models: when simple wins
Why linear models are still the right answer surprisingly often — and the regularization tricks that make them production-grade.
-
Lesson 53
Hyperparameter tuning: grid, random, bayesian, optuna
The four search strategies, when each makes sense, and why optuna is the 2026 default.
-
Lesson 54
ML project: a classification problem, end to end
From raw CSV to deployed model: the lessons of Module 9 made tactile.
-
Lesson 55
Neural networks in plain English
What a neural network actually is, why backpropagation works, and where deep learning genuinely beats classical ML.
-
Lesson 56
PyTorch: the modern default
Tensors, autograd, the nn module, and the Python-feel that made PyTorch win.
-
Lesson 57
The training loop, in code
The five lines that turn a randomly-initialized network into a trained model — and the bookkeeping that makes them production-grade.
-
Lesson 58
Pre-trained models + transfer learning + Hugging Face
The realistic path from zero to a working deep learning model in 2026 — start with a pre-trained one, fine-tune on your data.
-
Lesson 59
AI vs ML in 2026: when to call an LLM, when to train
The decision that didn't exist five years ago: use a hosted model, fine-tune an open one, or train your own?
-
Lesson 60
Capstone: what you know now, where to go next
A look back at the 60 lessons, a look forward at where Python is heading, and the resources that take you from intermediate to expert.