{"schemaVersion":"1.0","record":{"label":"Polars","description":"Rust-based dataframe query engine with expression APIs, lazy optimization and qualified streaming execution.","aliases":[],"kind":"software","website":"https://pola.rs/","overview":"Polars is a dataframe query engine written in Rust, with expression-based transformation and eager or lazy workflows. Lazy queries can be optimized before execution and processed in batches, making it an alternative for table-analysis code that can adopt its API and data semantics.","license":"Open source under the MIT license.","lifecycle":"active","example":false,"features":[{"name":"Lazy analytical queries","status":"supported","detail":"Expression-based lazy queries permit optimization before execution.","useCase":"Tabular transformation, grouping and file-based analytical queries","platforms":["Python","Rust"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://docs.pola.rs/user-guide/concepts/lazy-api/","locator":"Query planning and deferred execution","retrievedAt":"2026-10-07T17:08:17Z","kind":"vendor"}]},{"name":"Larger-than-memory execution","status":"limited","detail":"Streaming processes batches, but some operations fall back to in-memory execution.","useCase":"Tabular transformation, grouping and file-based analytical queries","platforms":["Python","Rust"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://docs.pola.rs/user-guide/concepts/streaming/","locator":"Batch execution, in-memory fallback and physical plans","retrievedAt":"2026-10-07T17:05:58Z","kind":"vendor"}]},{"name":"pandas conversion","status":"limited","detail":"Requires pandas and PyArrow; Arrow-backed arrays preserve nulls, but later operations may convert to NumPy.","useCase":"Tabular transformation, grouping and file-based analytical queries","platforms":["Python","Rust"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.to_pandas.html","locator":"Arrow conversion and later NumPy copies","retrievedAt":"2026-10-07T17:07:06Z","kind":"vendor"}]}],"alternatives":[],"slug":"polars","draftAlternatives":[{"targetSlug":"pandas","status":"limited","detail":"Can replace pandas transformations when expressions are rewritten and index/missing-data semantics are checked. Not an import-name-only replacement.","useCase":"Tabular transformation, grouping and file-based analytical queries","platforms":["Python","Rust"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://docs.pola.rs/user-guide/migration/pandas/","locator":"Expressions and index differences","retrievedAt":"2026-10-07T17:06:14Z","kind":"vendor"},{"url":"https://docs.pola.rs/user-guide/expressions/missing-data/","locator":"Null and NaN distinctions","retrievedAt":"2026-10-07T17:08:17Z","kind":"vendor"}]}],"evidence":[{"url":"https://github.com/pola-rs/polars","locator":"Query engine, language bindings and MIT license","retrievedAt":"2026-10-07T17:05:58Z","kind":"vendor"},{"url":"https://docs.pola.rs/user-guide/concepts/lazy-api/","locator":"Query planning and deferred execution","retrievedAt":"2026-10-07T17:08:17Z","kind":"vendor"},{"url":"https://docs.pola.rs/user-guide/concepts/streaming/","locator":"Batch execution, in-memory fallback and physical plans","retrievedAt":"2026-10-07T17:05:58Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://github.com/pola-rs/polars","locator":"Query engine, language bindings and MIT license","retrievedAt":"2026-10-07T17:05:58Z","id":"repo","title":"Polars repository","kind":"vendor"},{"url":"https://docs.pola.rs/user-guide/migration/pandas/","locator":"Expressions and index differences","retrievedAt":"2026-10-07T17:06:14Z","id":"migration","title":"Coming from pandas","kind":"vendor"},{"url":"https://docs.pola.rs/user-guide/concepts/streaming/","locator":"Batch execution, in-memory fallback and physical plans","retrievedAt":"2026-10-07T17:05:58Z","id":"stream","title":"Streaming","kind":"vendor"},{"url":"https://docs.pola.rs/releases/upgrade/2/","locator":"Lazy streaming default and breaking table-operation changes","retrievedAt":"2026-10-07T17:05:58Z","id":"upgrade","title":"Polars 2.0 upgrade guide","kind":"vendor"},{"url":"https://pypi.org/project/polars/","locator":"2.0.0 published October 6, 2026","retrievedAt":"2026-10-07T17:07:06Z","id":"release","title":"Polars package release","kind":"vendor"},{"url":"https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.to_pandas.html","locator":"Arrow conversion and later NumPy copies","retrievedAt":"2026-10-07T17:07:06Z","id":"conversion","title":"DataFrame.to_pandas","kind":"vendor"},{"url":"https://docs.pola.rs/user-guide/installation/","locator":"Optional features, big index and CPU compatibility","retrievedAt":"2026-10-07T17:05:58Z","id":"install","title":"Polars installation","kind":"vendor"},{"url":"https://docs.pola.rs/user-guide/concepts/lazy-api/","locator":"Query planning and deferred execution","retrievedAt":"2026-10-07T17:08:17Z","id":"lazy","title":"Polars lazy API","kind":"vendor"},{"url":"https://docs.pola.rs/user-guide/expressions/missing-data/","locator":"Null and NaN distinctions","retrievedAt":"2026-10-07T17:08:17Z","id":"missing","title":"Polars missing data","kind":"vendor"}],"overviewCitations":["repo","lazy","stream"],"licenseCitations":["repo"],"sections":[{"id":"queries","heading":"Expressions and execution","paragraphs":[{"id":"queries-detail","content":[{"text":"Polars expressions describe column transformations and aggregations. A lazy workflow builds a plan before materializing a result, allowing optimization across operations. The 2.0 upgrade guide makes streaming the default resolution of auto for lazy collection; eager DataFrame operations still use the in-memory engine under auto. These modes should not be conflated."}],"citations":["lazy","upgrade"]}]},{"id":"memory","heading":"Streaming and memory limits","paragraphs":[{"id":"memory-detail","content":[{"text":"Streaming evaluates suitable queries in batches instead of requiring every input row at once. Some operations are inherently non-streaming or lack a streaming implementation and can fall back to in-memory execution. The physical query graph helps identify memory-intensive portions. Streaming therefore supports larger-data workflows, but does not establish that an arbitrary query or final materialized result fits within a particular memory budget."}],"citations":["stream"]}]},{"id":"semantics","heading":"Table and missing-data semantics","paragraphs":[{"id":"semantics-detail","content":[{"text":"Polars does not have pandas-style labeled indexes or MultiIndexes; operations identify relevant columns explicitly. It distinguishes null, used for missing data across types, from floating-point NaN, which is a numerical value rather than its missing-data marker. Moving a calculation between libraries requires attention to alignment and missing-value handling, even where the visible source tables look alike."}],"citations":["migration","missing"]}]},{"id":"interchange","heading":"pandas conversion","paragraphs":[{"id":"interchange-detail","content":[{"text":"The to_pandas conversion requires pandas and PyArrow. Its Arrow-backed extension-array option can preserve nulls and permit zero-copy operations, but subsequent pandas operations unsupported by Arrow compute may convert to NumPy. Conversion is a useful integration boundary, not a promise that an entire mixed-library pipeline remains zero-copy or retains every operation's execution behavior."}],"citations":["conversion"]}]},{"id":"versions","heading":"Version migration","paragraphs":[{"id":"versions-detail","content":[{"text":"Polars 2.0.0 was published on October 6, 2026. Its upgrade guide records changes beyond execution defaults: horizontal concatenation requires equal heights, and exploding an empty list defaults to producing no row rather than a null row. Multi-file CSV inference examines the first ten files by default. These changes can alter errors, row counts or inferred types in existing pipelines."}],"citations":["release","upgrade"]}]},{"id":"availability","heading":"Licensing and runtime options","paragraphs":[{"id":"availability-detail","content":[{"text":"The library is MIT-licensed and offers Python and Rust installation routes. Default index width limits dataframe row counts; a big-index option expands it. A compatibility runtime supports older CPUs, while GPU, database or spreadsheet integrations require relevant optional components. Installing the core package alone does not establish availability of every optional backend."}],"citations":["repo","install"]}]},{"id":"substitution","heading":"Substitution considerations","paragraphs":[{"id":"substitution-detail","content":[{"text":"Polars can substitute for "},{"text":"pandas","targetSlug":"pandas"},{"text":" where table-processing code can be rewritten around expressions and explicit columns. Evaluate query plans and conversion boundaries rather than assuming a universal performance advantage. Index-dependent code, missing-value rules and version changes are concrete migration costs even when both libraries offer joins and aggregations."}],"citations":["migration","stream","conversion","upgrade"]}]}]},"id":"Q274","revision":259,"updatedAt":"2026-10-10T17:59:19Z","sourceUrl":"https://substitutefor.net/entities/Q274?revision=259"}}