Module · 1 lessons

Start with a Real Workflow

Why Polars exists, how it differs from pandas and plain Python, and your first real Polars project and pipeline.

At a glance

Level
Beginner
Lessons
1 lessons
Time to complete
1–2 weeks
Cost
Free forever · no sign-up

Every Polars skill in this course gets exercised against one real, running example: Thistlewood Goods, a small home-goods retailer with customers, products, orders, order line items, returns, and promotions. This module builds that dataset for real — around 180 customers, 60 products, 6,000 orders, and 14,000+ order line items, generated by one seeded script so the numbers are exactly reproducible — and it’s the same data every later module in this course reuses.

Before any of that, you’ll answer the question this course is built to answer properly: what problem does Polars actually solve, and why isn’t the honest answer just “it’s faster pandas”? You’ll see a real Python loop hit a real wall, then see the same task expressed as a Polars expression and measure the difference yourself rather than taking anyone’s word for it.

From there it’s hands-on setup: a real local project with a virtual environment and a sensible folder layout, a real pip install polars you verify yourself, and a first tiny pipeline that reads data, filters it, aggregates it, and prints a real answer. The module closes with a guided project — read a CSV of real Thistlewood Goods orders and produce a genuine summary: revenue, orders per month, and top categories, all computed, none invented.

Start with Lesson 1, where a plain Python loop meets its limits on data that Polars handles without blinking.

About the Thistlewood Goods Dataset

Lesson 5 of this module builds the full canonical dataset from scratch using a single seeded (seed 42) generator script, hosted at static/datasets/thistlewood/generate_thistlewood_data.py (and published at https://datatweets.com/datasets/thistlewood/generate_thistlewood_data.py). It writes seven CSV files, all hosted under https://datatweets.com/datasets/thistlewood/:

  • thistlewood_customers.csv — 180 customers (retail and wholesale)
  • thistlewood_products.csv — 60 products across 8 categories
  • thistlewood_orders.csv — 6,000 orders, 2024-01-01 through 2025-12-31
  • thistlewood_order_items.csv — 14,054 order line items
  • thistlewood_returns.csv — 450 returns (7.5% of orders)
  • thistlewood_promotions.csv — 25 category- and product-level promotions
  • thistlewood_orders_flat.csv — a small, already-joined Q1 2024 sample (1,749 rows) used by this module’s guided project, before joins are taught

Every table’s keys are consistent with every other table (a product_id in thistlewood_order_items.csv always exists in thistlewood_products.csv, and so on), and every line item’s sale price is either the product’s catalog price or a genuine discount from an active promotion in thistlewood_promotions.csv — never higher than catalog price. Later modules reuse these exact files rather than regenerating them; a few modules (cleaning, text/categories, nested data, lazy execution) derive their own variant files from this same base data, documented in POLARS_BLUEPRINT.md.

Lessons in this module

Achievement

Complete all 1 lessons to finish the Start with a Real Workflow module.

Start module
Sponsor

Keep DATATWEETS free. Help fund practical data, AI, and engineering lessons for learners worldwide.

Buy Me a Coffee at ko-fi.com