Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Special-purpose data structures

Choose a data structure to suit the operations your program performs most often. This section introduces collections with specialized storage and access patterns, along with the tradeoffs that make them useful.

Start with Columnar lists: keep an ordinary class-shaped interface while storing each primitive field in its own contiguous column.

For analytical queries and Parquet datasets, use Dataframes: explicit expression plans executed by an optional Polars engine. Columnar lists remain the lightweight mutable collection.