Pandas to DuckDB
Translate DataFrame operations into SQL and check the results.
A focused 6-page practical workbook by Thomas Reid, with a runnable eight-check comparison project, sample CSV, setup instructions, exercises and worked answers.
Compare selection, filtering, grouping, top-N sorting, a left join, date filtering, a running total and a Parquet round trip. Learn where ordering, missing keys, nulls and data types need deliberate decisions. This is a small local example, not a performance benchmark or a complete migration service.
Download: one ZIP containing the PDF, Python source, CSV, requirements and README. Tested on Windows with Python 3.13.17, Pandas 2.2.3 and DuckDB 1.4.3.
This is a revised practical edition based on my published Medium article, with replacement runnable examples. It is not a verbatim reprint. Suitable for readers familiar with basic Python and DataFrames.