Polars is worth evaluating at a slow DataFrame pipeline when you can change its API and compare the saved output. Teams expecting pandas assignment patterns, incidental ordering and every integration to carry across unchanged should keep their current pipeline. Our Python quickstart reached a missing orders.parquet file; our source build stopped at Python library linkage. The migration decision rests on the README's expression-based query design and attributed workload results, rather than a universal speed ranking.
What people use Polars for
Polars users report lazy file queries for dashboards, large aggregations and transformations outside a database. A DataFrame is a table with typed columns; a LazyFrame describes operations before execution. The README's lazy query scans a Parquet file, filters shipped orders, groups by customer, calculates totals and collects the result. That sequence gives a newcomer a concrete picture of the API: expressions describe the transformation, and execution produces the table.
| Who used it | Work they did | Reported outcome |
|---|---|---|
| Panoply's reviewer | Aggregated roughly 30 million TPC-H rows on an M1 laptop | Lazy streaming took 0.43 seconds versus 6.27 seconds eagerly. |
| Plotly's benchmark authors | Queried weather Parquet files inside a Dash callback | Lazy Polars started in 0.2 seconds, used 0.04 GB per worker at startup and returned the callback in 749 ms. |
| Chris Parmer at Plotly | Grouped taxi trips by route and minute on a 4 GB host | Polars 2.1 processed 46.9 million trips into 44.2 million groups, peaking at 508 MB with a 128 MB budget; Polars 2.0 restarted the container. |
| ratczar on r/dataengineering | Transformed data outside a governed database | The commenter completed transformations in memory without permission to create the intermediate database objects they wanted. |
These examples answer different engineering questions. Panoply compared execution styles within Polars. Plotly changed when a dashboard reads its files, removing the cost of loading a DataFrame into each worker at startup. ratczar described a permissions constraint that made database-side transformations inconvenient. Choose the example closest to your bottleneck: query execution, application startup and database governance each call for a different comparison, even when all three lead someone to use the same library.
What happened when we ran it
Our November 24 quickstart installed Polars 2.1.0 in 1.4 seconds, then the unedited README example failed because orders.parquet was absent. The installation used uv pip install polars in a fresh virtual environment. The checkout was commit 68f83a578b9a, while the Python package came separately from PyPI. The installed package version and checked-out source commit identify different parts of the run.
The command returned FileNotFoundError: No such file or directory (os error 2): orders.parquet, with exit 1 after 1 second. The README query references status, customer_id and amount; it expects a file containing those columns. The recorded snippet finding names the same missing input. Installation therefore completed before the first analytical task stopped at its file boundary.
| November 24 quickstart step | Recorded result |
|---|---|
| Checkout | Clone completed in 3 seconds |
| Python package | Polars 2.1.0 installed in 1.4 seconds |
| Installed footprint | 174.8 MB in the virtual environment's site-packages |
| Dependencies | 1 package besides Polars installed |
| README task | Failed in 1 second, exit 1, missing orders.parquet |
| Cleanup | Teardown completed successfully |
The quickstart used an unprivileged container with 2 CPUs, 4 GB RAM, no published ports and no secrets. Its image label was ghcr.io/astral-sh/uv:python3.12-bookworm. Our earlier source run used commit 2cb2e31 on November 11, with 3 CPUs, 12 GB RAM and image lab-rust:1. These configurations separate the ordinary Python package attempt from the Rust source-build attempt.
| November 11 source step | Result | What the log shows |
|---|---|---|
| Install | Succeeded, 75 seconds; 450 dependencies | The dependency step completed |
| Build | Failed, 608 seconds; exit 101 | polars-dylib could not link -lpython3.11 |
| Tests | Failed, 39 seconds; exit 101 | polars-observer library-test compilation hit the same linker error |
Our source run recorded the installation, build and test outcomes, including rust-lld: error: unable to find library -lpython3.11 in both failing tails. The test command stopped during compilation of polars-observer library tests. The scanner also found 20 CI workflow files and no directory named tests; the failing compilation itself identifies library tests, so that directory-name signal describes the scan rather than the project's full testing structure.
Where people get stuck: assignment, nulls and file boundaries
Panoply's reviewer reports that pandas-style Series assignment failed and the error directed them to with_columns. That assignment example makes the migration cost concrete: adding or replacing a column uses a Polars expression rather than carrying across df["b"] = .... The same review reports changed join order under streaming. Define which values, types and ordering your downstream code expects before treating a faster transformation as equivalent.
| Symptom | What the report says | Reported response |
|---|---|---|
| An all-null sum becomes zero | Issue #10016 discusses users expecting null propagation | ritchie46 retained the empty-set convention and demonstrated a composed aggregation returning null when null_count() is positive. |
| Database export takes longer | Issue #7852 reports write_database slower than to_pandas().to_sql() | The reporter used the pandas export path; the issue is open. |
| A Parquet timestamp uses timezone +00:00 | Issue #9586 reports timezone failures and shows the file's offset-based schema | MarcoGorelli demonstrated use_pyarrow=True and proposed overriding the schema. |
| HDF5 migration loses structured-array fields | Issue #3520 describes a single object column after NumPy structured-array conversion | Native HDF5 reading and writing is an open feature request. |
The all-null example belongs in an output comparison because a missing total and a measured zero carry different meanings. Record the expected result for that group alongside the column types. Database export belongs in the same comparison: issue #7852 describes time spent after the transformation has finished. Measuring the saved output, rather than stopping the clock at a query result in memory, captures the boundary the application actually uses.
Streaming still needs memory for groups and space for spills
Maintainer orlp explains that out-of-core operators spill to disk when the data being processed exceeds available memory. The streaming implementation discussion distinguishes that behavior from streaming nodes. Reading input in batches and retaining aggregation state are separate parts of execution. A grouping with few keys has a different state requirement from a grouping that places almost every input row into its own group.
Plotly's 12-month taxi experiment makes the memory trade visible: Polars 2.1 took 12.9 seconds and peaked at 3,091 MB with the default budget, versus 33.1 seconds and 508 MB with a 128 MB budget. The lower-budget run spilled 1,442 MB, compared with 9 MB under the default. The configured budget and measured process peak are different figures; 128 MB was the setting, while 508 MB was the reported peak.
Spill placement changed Plotly's deployment result. Its article reports that the tested release used POLARS_OOC_SPILL_DIR rather than POLARS_TEMP_DIR for these spill files. Files on the container disk counted against application memory on Plotly Cloud, and pointing the spill directory at persistent storage resolved that reported restart. Disk capacity, storage placement and query runtime therefore belong in the same deployment estimate as RAM.
A production migration starts at the input and ends at the saved output
XtremeGoose reports tens of thousands of production lines of Polars and recommends LazyFrames, explicit entry and exit schemas, and a thread count aligned with the Kubernetes CPU request. The r/Python production discussion gives these as practitioner advice. A schema names the expected columns and their types. Keeping it in code at ingestion and export makes the pipeline's data contract visible at both boundaries.
For a first migration, choose one slow pipeline with a known output and keep the input fixed. Compare saved values and schemas, record total runtime through export, and decide whether row order is part of the contract. Panoply reports restoring left-join order with maintain_order="left". An aggregation total can match while rows arrive in a different order, so key-based equality and ordered equality answer separate questions.
Package installation and local execution
The README documents pip install polars for Python and lists Rust plus maturin for source compilation. Its source-build instructions then direct contributors into py-polars to choose a build target. Package installation and source compilation serve different starting points: an analyst evaluating expressions can begin with the package route, while a contributor working on the engine needs the native toolchain and its build configuration.
The installation guide documents polars[rtcompat] for old CPUs without AVX support, and explains that optional dependencies keep the core installation smaller. The README identifies the library as MIT licensed and links distributed execution separately. Polars' vendor comparison describes Nanook as the distributed engine, alongside in-memory and streaming engines intended for a single machine. Those are distinct operating choices within the vendor's product description.
Polars vs pandas, DuckDB, PySpark, Dask and PyArrow
Plotly reports query-dependent winners: Polars was faster on most one-year weather queries, while DuckDB was faster on most queries covering 10 years or more. In that comparison, DuckDB finished every query on 1.14 billion rows, while Polars 2.1 finished three of four. These results make query shape and dataset size more useful selection criteria than a single overall speed label.
| Comparison | Reason to choose the alternative | Reason to consider Polars |
|---|---|---|
| Polars vs pandas | Practitioners retain pandas for smaller tasks and surrounding integrations. | Practitioners describe using LazyFrames for datasets they cannot load all at once. |
| Polars vs DuckDB | Plotly's DuckDB run completed every largest weather query. | Polars won most one-year queries in the same comparison. |
| Polars vs PySpark | Spark was designed for distributed processing across clusters. | Polars' vendor comparison positions its local engines for single-machine work. |
| Polars vs Dask | Dask includes distributed arrays and custom task graphs beyond DataFrames. | Polars' comparison describes its own DataFrame API and local execution focus. |
| Polars vs PyArrow | Arrow interoperability concerns the data boundary as well as computation. | Polars documents its own compute and buffer implementations. |
Plotly's larger weather results also show why memory belongs beside runtime in an evaluation. DuckDB's reported peak stayed at or below 0.46 GB in those tests, and it completed the full set of largest queries. Polars completed three of four. A team already comfortable with SQL has a concrete reason to include DuckDB when selecting an engine for joins and aggregations, while a team using expressions can compare the cost of keeping that interface.
Outdated claims, corrected
Polars' landing-page speed slogan is broader than the workload-specific results reported by Panoply and Plotly. The landing page calls it the fastest engine on a single machine, whereas Plotly reports different winners by query and dataset size. Attach the workload to the number: Panoply's 0.43-second lazy result compares Polars execution styles, and Plotly's weather results compare engines across several queries.
Polars' SQL documentation makes its zero-copy statement conditional: it covers PyArrow and pandas data using PyArrow dtypes when the underlying data maps cleanly to a supported native type. That documented condition gives a more precise conversion rule than the open-source FAQ's broader wording. Conversion time belongs in an end-to-end comparison whenever the application crosses between pandas, Arrow and Polars objects.
Start Data Engineering's tutorial says group-by requires processing the entire dataset and converting a LazyFrame with collect(). Plotly reports that Polars 2.1 can spill group-by working state to disk. Those statements concern different execution properties: spilling changes where working state is held, while collect() materializes the final result. The tutorial's collection guidance and Plotly's group-by experiment should be read with that distinction intact.
Posit's cheatsheet recommends lf.profile() for per-node timings; Panoply's review reports its removal in the 2.x migration. Keep that removal attributed to Panoply when reading the cheatsheet's profiling advice. NeuralNine's crash course also describes an in-memory default, whereas DataPolars' October 6 announcement says Polars 2.0 makes streaming the default. Tutorial execution advice needs its version attached.
FAQ
Polars is a Rust analytical engine with a Python DataFrame interface; choosing it over pandas depends on the transformation and integration costs. The production migration discussion contains both a report of extensive Polars use and advice about explicit schemas. The questions below connect those reported practices to the engine comparisons and setup outcomes above, so a first evaluation can focus on one complete pipeline.
Should I choose pandas or Polars for data analysis?
Practitioners report retaining pandas for small tasks and using Polars LazyFrames for larger data. The r/learnpython discussion asks this selection question, while the production discussion adds integration requirements to the decision. Keep a working pandas analysis when changing engines buys little; consider Polars when one measured bottleneck justifies rewriting expressions and comparing the saved result, including its schema and required ordering.
Is migrating a production pandas codebase to Polars worth it?
XtremeGoose reports a mostly completed switch and tens of thousands of production lines of Polars. Their production migration comment recommends LazyFrames, explicit schemas and Kubernetes thread limits. That is a useful design report for a bounded migration. Estimate the expression rewrites and input/output work for your own pipeline, and compare total job time through the final export rather than the transformation step alone.
Which real workflows make Polars worth using?
Lazy Parquet dashboards and high-cardinality aggregations have concrete reported results. Plotly measured 0.2-second startup and a 749 ms callback for lazy Parquet queries, while its taxi experiment measured group-by memory and spilling. A separate r/dataengineering commenter used Polars outside a governed database. Those examples give three different reasons to evaluate it: startup cost, aggregation state and permission to transform data.
How does Polars compare with pandas and DuckDB in performance and memory use?
Plotly's weather comparison found Polars faster on most one-year queries and DuckDB faster on most queries covering 10 years or more. DuckDB completed all four queries on 1.14 billion rows; Polars 2.1 completed three. Use those results to select candidates for the same workload, including file reads, transformations, conversions and output. The query that dominates your application should dominate the evaluation.
What we have not tested yet
Our runs stopped before producing an analytical result, so we have no independent Polars-versus-pandas-versus-DuckDB performance or correctness result. We have not tested a repaired README example, a repaired source build, database export throughput, HDF5 migration, GPU execution, Nanook, security behavior or sustained concurrency. Image labels do not establish full runtime versions. The source log tails identify the missing linker library without demonstrating its cause or a repair; no completed behavioral-test count follows from the compilation failure.
Group-by spilling does not establish that collecting a result is unnecessary, that every operation can spill, or that an aggregation avoids reading its full input. The tutorial and Plotly article do not resolve which execution claim the tutorial intended. Likewise, the streaming tracker and Plotly's 2.1 assessment leave the exact release boundary for individual out-of-core join cases unresolved. These sources support a distinction between working state and final output, rather than a blanket correction of collection semantics.
Historical issue reports also have narrower scope than a current-version reliability judgment. Issue #14939 describes intermittent collection deadlocks on 0.20.x, with lower concurrency reportedly helping at a runtime cost and removal of map_* calls failing to resolve the problem. Its closure identifies no confirmed fixed release. Similarly, the timezone workarounds in issue #9586 include a later report that the suggested cast failed; neither closure demonstrates a universal repair for current installations.


