# Polars

Rust\-based dataframe query engine with expression APIs, lazy optimization and qualified streaming execution\.

ID: Q274 · Revision: 1626

Type: software · License: Open source under the MIT license\.[^repo] · Status: active

Website: https://pola.rs/



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\.[^repo][^lazy][^stream]

## Expressions and execution

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\.[^lazy][^upgrade]

## Streaming and memory limits

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\.[^stream]

## Table and missing\-data semantics

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\.[^migration][^missing]

## pandas conversion

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\.[^conversion]

## Version migration

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\.[^release][^upgrade]

## Licensing and runtime options

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\.[^repo][^install]

## Substitution considerations

Polars can substitute for [pandas](/pandas) 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\.[^migration][^stream][^conversion][^upgrade]

Polars can substitute for [Vaex](/vaex) for supported filtering, column transformations and grouped summaries of typed tables\. Its lazy query plans can combine those steps before execution, and streaming can process suitable queries in batches\. This can suit a reusable data\-transformation pipeline, but it requires rewriting Vaex expressions and checking input types and output values\. Some Polars operations fall back to in\-memory execution; a lazy query does not guarantee that every dataset or result fits available memory, or replace Vaex’s visualization workflow\.[^lazy][^stream][^vaex-overview][^vaex-performance]

## Capabilities and substitutions

### Lazy analytical queries — supported

Expression\-based lazy queries permit optimization before execution\.[^lazy]

Use case: Tabular transformation, grouping and file\-based analytical queries · Platforms: Python, Rust · Region: Version, build and integration requirements apply

### Larger\-than\-memory execution — limited

Streaming processes batches, but some operations fall back to in\-memory execution\.[^stream]

Use case: Tabular transformation, grouping and file\-based analytical queries · Platforms: Python, Rust · Region: Version, build and integration requirements apply

### pandas conversion — limited

Requires pandas and PyArrow; Arrow\-backed arrays preserve nulls, but later operations may convert to NumPy\.[^conversion]

Use case: Tabular transformation, grouping and file\-based analytical queries · Platforms: Python, Rust · Region: Version, build and integration requirements apply

### [Substitute for pandas](/pandas) — limited

Can replace pandas transformations when expressions are rewritten and index/missing\-data semantics are checked\. Not an import\-name\-only replacement\.[^migration][^missing]

Use case: Tabular transformation, grouping and file\-based analytical queries · Platforms: Python, Rust · Region: Version, build and integration requirements apply

### [Substitute for Vaex](/vaex) — limited

Covers supported table filtering, transformations and grouped summaries through lazy query plans and qualified streaming\. Vaex expressions and visualization workflows need adaptation; in\-memory fallback and result sizes still affect memory requirements\.[^stream][^lazy][^vaex-overview][^vaex-performance]

Use case: Table transformation and grouped statistical summaries · Platforms: Python · Region: Operation, data\-type and memory requirements apply

## References

[^repo]: [Polars repository](<https://github.com/pola-rs/polars>) — Query engine, language bindings and MIT license (vendor; retrieved 2026-10-07T17:05:58Z)

[^migration]: [Coming from pandas](<https://docs.pola.rs/user-guide/migration/pandas/>) — Expressions and index differences (vendor; retrieved 2026-10-07T17:06:14Z)

[^stream]: [Streaming](<https://docs.pola.rs/user-guide/concepts/streaming/>) — Batch execution, in\-memory fallback and physical plans (vendor; retrieved 2026-10-07T17:05:58Z)

[^upgrade]: [Polars 2\.0 upgrade guide](<https://docs.pola.rs/releases/upgrade/2/>) — Lazy streaming default and breaking table\-operation changes (vendor; retrieved 2026-10-07T17:05:58Z)

[^release]: [Polars package release](<https://pypi.org/project/polars/>) — 2\.0\.0 published October 6, 2026 (vendor; retrieved 2026-10-07T17:07:06Z)

[^conversion]: [DataFrame\.to\_pandas](<https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.to_pandas.html>) — Arrow conversion and later NumPy copies (vendor; retrieved 2026-10-07T17:07:06Z)

[^install]: [Polars installation](<https://docs.pola.rs/user-guide/installation/>) — Optional features, big index and CPU compatibility (vendor; retrieved 2026-10-07T17:05:58Z)

[^lazy]: [Polars lazy API](<https://docs.pola.rs/user-guide/concepts/lazy-api/>) — Query planning and deferred execution (vendor; retrieved 2026-10-07T17:08:17Z)

[^missing]: [Polars missing data](<https://docs.pola.rs/user-guide/expressions/missing-data/>) — Null and NaN distinctions (vendor; retrieved 2026-10-07T17:08:17Z)

[^vaex-overview]: [Vaex dataframe overview](<https://vaex.io/docs/>) — Lazy out\-of\-core dataframes, statistical aggregation and exploratory visualization (vendor; retrieved 2026-10-11T14:42:22Z)

[^vaex-performance]: [Vaex performance notes](<https://vaex.io/docs/guides/performance.html>) — Virtual columns, materialization and shared file\-backed data (vendor; retrieved 2026-10-11T14:42:00Z)

Source revision: https://substitutefor.net/entities/Q274?revision=1626
