Lazy by Design
An Independent Guide to Fast DataFrames in Python with Polars
-
- $0.99
-
- $0.99
Publisher Description
An independent, practical guide to fast, reliable data processing in Python with the open-source Polars DataFrame library, current to version 2.2. Instead of a tour of functions, the book builds a clear model of how a lazy DataFrame engine works: columnar memory, expressions evaluated in contexts, query plans that an optimizer rewrites, and engines that execute them in parallel. From that model it teaches data types and missing values, column transformations, grouping and window functions, safe joins including as-of and inequality joins, reshaping and nested types, time series across time zones, text, categories and enums. Later chapters explain how to read query plans, process data larger than memory with the streaming engine that became the default in version 2.0, read and write CSV, Parquet and other formats, query frames with SQL, find and fix performance problems, exchange data with Arrow, other array and dataframe tools, and machine learning libraries, and test and upgrade pipelines safely, with a full checklist of the 2.0 changes. One fictional bike-share operator runs through every chapter, and the final chapter assembles its complete monthly pipeline. Every listing was run with Polars 2.2.0 and shows its real output. Includes a cheat sheet, a hands-on lab, a troubleshooting table, review questions with answers and a glossary.