GuideBeginner

Python For Data Engineering

Picks up directly from `data-engineering-foundations-guide`: same Kiosko case, same pipeline, same `orders` and `events` data — what changes is how the code that processes them is written. This guide takes the plain script from foundations and turns it, module by module, into a production Python package: packaged with `uv` (`pyproject.toml`, `src/` layout, `uv.lock`), `pytest` tests over every pipeline function, structured JSON logging instead of `print`, deterministic retries with `tenacity` for transient failures, and DuckDB and Polars in depth as the two daily-driver transformation engines that replace the plain Python loops and `sqlite3` from foundations. pandas is never used. It closes with a capstone that assembles the full package — installable, tested, logged, resilient — and compares three implementations of the same transformation (a Python loop, SQL with DuckDB, a Polars `LazyFrame`) to prove they all produce exactly the same result.

64
lessons
8
modules
English · Spanish
available in
Yes
certificate
Free
access
NIEVA

Outcomes

What you'll be able to do

  • Turn a plain script into an installable package with `uv`: `pyproject.toml`, `src/` layout, `uv.lock`, and `uv run` as the way to execute it
  • Write `pytest` tests (fixtures, parametrize, arrange-act-assert) over the extraction, transformation, and quality functions inherited from foundations
  • Replace every `print()` with structured JSON logging carrying context (`run_id`, `partition_date`) using the `logging` module and `structlog`
  • Distinguish errors that should retry from errors that should go to quarantine, and implement deterministic retries with `tenacity` (backoff, jitter, when to give up), tested without using `random`
  • Use DuckDB as a daily-driver engine: direct SQL over Parquet/CSV, the relational API in Python, and file vs. in-memory persistence
  • Use Polars in depth: eager DataFrames vs. `LazyFrame`, the optimized query plan via `.explain()`, expressions, `group_by`/`agg`, and joins
  • Decide with real criteria when to use DuckDB and when to use Polars, and why both displaced pandas in production pipelines
  • Assemble a final package with a command-line entry point, configuration with no hardcoded values, and an integration test that proves idempotency with an `assert`, not by eyeballing it

Before you start

What you need to bring

It's for you if...

  • Anyone who already completed `data-engineering-foundations-guide` (or has an equivalent pipeline written as a plain script) and wants to bring it to production quality
  • Junior data engineers writing pipelines that work but lack tests, structured logging, and retry handling
  • Developers still using pandas out of habit who want to migrate to DuckDB/Polars with real criteria, not because it's trendy
  • Anyone who needs to deliver a data pipeline that a real engineering team would accept in code review

Requirements and materials

  • `data-engineering-foundations-guide` completed (or equivalent: Kiosko's extraction, quality, transformation, and load pipeline working as a plain script)
  • Intermediate Python: functions, exception handling, list comprehensions
  • A personal laptop with Python 3 and `uv` installable — everything runs locally at $0

Content

The syllabus, module by module

Open any of them to see its lessons.

Common questions

What people usually ask

Start whenever you like

Reviews

What students say

These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.

No approved reviews yet.

Be the first to share your experience!