Sources and licences

The book's own text and code are licensed under the MIT licence.

Ported chapters keep the licence of their source. Each one says so in the box at its top, together with its authors and what the port changed. A source is only ported when its licence allows it; sources without a licence are used as a list of topics at most.

Source Licence Chapters Data
Polars user guide, by the Polars contributors MIT (copy) Getting started, Data types and structures, Expressions and contexts, Lazy API, Lazy schemas, Lazy usage, query execution, query plan, sources and sinks, multiplexing queries and datatype expressions, Streaming, Basic operations, Expression expansion, Casting, Missing data, Strings, Categorical data and enums, Lists and arrays, Structs, Folds, User-defined functions, Aggregation, Window functions, Time series (parsing, filtering, time zones, grouping, resampling), Joins, Concatenation, Pivots, Unpivots, CSV, Parquet, JSON files, Multiple files, Hive partitioning, Excel, Databases, Arrow producer/consumer, SQL (introduction, SELECT, CREATE, Common Table Expressions, SHOW TABLES); the Rust polars crate's eager and lazy cookbooks (same licence) data/polars/ (Monopoly properties, the 100-row Reddit sample reddit.csv, the iris dataset and orders.ndjson, from the Polars repository; alltypes_plain.parquet also comes from there, originally from Apache's parquet-testing, Apache-2.0; iris is originally from the UCI Machine Learning Repository, CC BY 4.0; legislators-historical.csv holds columns of the US congress legislators list from the congress-legislators project, CC0)
polars-benchmark (PDS-H queries), by the Polars contributors Apache-2.0 (copy) PDS-H queries generated by tpchgen-cli (Apache-2.0) when the chapter runs, not stored
Python Polars: The Definitive Guide (O'Reilly, 2025), by Jeroen Janssens and Thijs Nieuwdorp: code repository Code: MIT (copy). The book's text is not covered: the chapters' text is the Nanuq book's own Data structures and data types, Eager and lazy APIs, Reading and writing data, Beginning expressions, Continuing expressions, Combining expressions, Selecting and creating columns, Filtering and sorting rows, Textual and temporal data types, Summarizing and aggregating, Joining and concatenating, Reshaping, Polars internals data/definitive-guide/ (fruit, tools, animals, directors, campaigns, transactions, the Pokédex JSON, the Wikimedia NDJSON and NVIDIA's 2023 stock prices and the NPO Radio 2 Top 2000 of 2023 from the book's repository, which ships them under its MIT licence; penguins is the Palmer penguins dataset, CC0)
Polars Cookbook (Packt, 2024), by Yuki Kakegawa: code repository Code: MIT (copy). The book's text is not covered: the chapters' text is the Nanuq book's own Getting started, Data transformation techniques, Handling missing values, String manipulations, Debugging chained operations data/polars-cookbook/ (the Titanic passenger list, the Pokémon table from a Polars gist, a hand-made temperatures table, and Contoso sales, generated with SQLBI's MIT-licensed Contoso Data Generator, from the book's repository)
Modern Polars, by Kevin Heavey CC BY 4.0 (copy), text and code Method chaining, Reshaping and tidy data, Timeseries (the Polars side; the pandas side is left out) data/modern-polars/ (ohlcv.pq, daily 2021 Bitcoin prices from the Binance API, and the 2015-16 NBA game results scraped from basketball-reference.com, both from the book's repository; flights_2022_01_01-02.csv, US domestic flights of 1-2 January 2022 from the Bureau of Transportation Statistics, a US government work in the public domain)
Real Python tutorials: materials repository Code: MIT (copy). The tutorials' text is not covered: the chapters' text is the Nanuq book's own Grouping data (“How to Group Data Using Polars .group_by()”), Missing data (“How to Deal With Missing Data in Polars”) data/real-python/ (the UCI Student Performance dataset by Cortez and Silva, CC BY 4.0, as the tutorial's Parquet files; tips.parquet, sales_trends.csv and ft_exercise.parquet from the materials repository, under its MIT licence)
db-benchmark, by H2O.ai and DuckDB Labs MPL-2.0 (copy) Group-by and join (db-benchmark): its 10 group-by and 5 join questions; the data generators are Nim rewrites of its R scripts, in bench/dbbench.nim (MPL-2.0) generated when the chapter runs, not stored
One Billion Row Challenge, by Gunnar Morling and contributors Apache-2.0 (copy) One Billion Row Challenge (the challenge and its generator; the chapter's text and code are the book's) data/1brc/weather_stations.csv (the 413 stations of CreateMeasurements.java); measurements generated when the chapter runs

The datasets used by the chapters are in the data folder, one subfolder per source, under the licence of that source.

The book is built with nimibook, whose theme and assets have their own licences (MPL-2.0 theme, fonts under Apache 2.0 and SIL OFL 1.1, highlight.js under BSD-3-Clause, clipboard.js and KaTeX under MIT).