polars
Library Featured
DataFrame library based on Apache Arrow
- Downloads
- 1,729,523
- Dependents
- 639
- Stars
- 40,285
- Forks
- 3,230
- Contributors
- 444
- Commits
- 16,277
- Latest release
- 0.55.2 ·
About
Documentation: Python - Rust - Node.js - R - SQL | Agents: Skill - MCP | User guide | Discord
Polars: Extremely fast Query Engine for DataFrames and SQL
Polars is an analytical query engine written in Rust. Write your queries with the DataFrame API, in SQL, or mix both: they run through the same optimizer and the same engine. It is designed to be fast, easy to use and expressive. Key features are:
- Fast: written from the ground up in Rust with multi-threaded, vectorized (SIMD) execution
- Spill to disk: Operations that exceed available RAM can spill to disk
- Expressive API: compose complex queries with powerful expressions
- Extensible: extend Polars natively with custom code through I/O and Expression plugins
- GPU support: optionally accelerate queries on NVIDIA GPUs
- Interoperable: uses the Apache Arrow Columnar Format for zero-copy data sharing
To learn more, read the user guide.
Polars in action
DataFrame API
Queries are composed from expressions or SQL. This lazy query gets optimized out of the box and runs in parallel across all available cores:
Read the full README
import polars as pl
df = (
pl.scan_parquet("orders.parquet")
.filter(pl.col("status") == "shipped")
.group_by("customer_id")
.agg(
pl.col("amount").sum().alias("total"),
pl.len().alias("n_orders"),
)
.sort("total", descending=True)
.collect()
)
SQL
import polars as pl
df = pl.sql("""
WITH totals AS (
SELECT customer_id, SUM(amount) AS total, COUNT(*) AS n_orders
FROM read_parquet('orders.parquet')
WHERE status = 'shipped'
GROUP BY customer_id
)
SELECT c.name, t.total, t.n_orders, RANK() OVER (ORDER BY t.total DESC) AS rank
FROM totals t
JOIN read_parquet('customers.parquet') c USING (customer_id)
ORDER BY t.total DESC
""").collect()
Mix both
DataFrames and LazyFrames in scope can be queried by name, and the result of a SQL query is a
regular LazyFrame, so you can switch between SQL and expressions freely:
orders = pl.scan_parquet("orders.parquet")
df = (
pl.sql("SELECT customer_id, SUM(amount) AS total FROM orders GROUP BY customer_id")
.filter(pl.col("total") > 1_000)
.collect()
)
Read more in the SQL user guide.
Performance
Polars is very fast. In fact, it is one of the best performing query engines available, for both DataFrame and SQL workloads. See the PDS-H benchmarks results.
Installation
Python
Install the latest Polars version with:
pip install polars
See the User Guide for more details on optional dependencies
Compile Polars from source
If you want a bleeding edge release you should compile Polars from source. Advanced users can also compile for maximum performance for their architecture.
This can be done by going through the following steps in sequence:
- Install the latest Rust compiler
- Install maturin:
pip install maturin cd py-polarsand choose one of the following:make build, slow binary with debug assertions and limited symbols, fast compile timesmake build-debug, same asmake build, but with all symbols, produces large binariesmake build-release, fast binary without debug assertions, minimal debug symbols, long compile timesmake build-nodebug-release, same as build-release but without any debug symbols, slightly faster to compilemake build-debug-release, same as build-release but with full debug symbols, slightly slower to compilemake build-dist-release, fastest binary, extreme compile times
By default the binary is compiled with optimizations turned on for a modern CPU. Specify LTS_CPU=1
with the command if your CPU is older and does not support e.g. AVX2.
Note that the Rust crate implementing the Python bindings is called py-polars to distinguish from
the wrapped Rust crate polars itself. However, both the Python package and the Python module are
named polars, so you can pip install polars and import polars.
Check the Installation guide for more advanced
installations. For example when you expect more than 2^32 (~4.2 billion) rows, run on an old CPU
(e.g. dating from before 2011), or on an x86-64 build of Python on Apple Silicon under Rosetta.
Contributing
Want to contribute? Read our contributing guide and check the issue tracker for accepted issues.
Contributors new to the codebase can look for the good first issue label to get familiar with the
project.
You can join the Polars Discord server for any help along the way.
Distributed Polars
Running into hardware limitations executing your queries? Read how you can horizontally scale your Polars query on a cluster.
License
Polars is licensed under the MIT License (SPDX: MIT).
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- Optional
- Binds native code: zstd-sys (feature decompress)
- Python bindings
- Has Python bindings
- polars-error needs Python only with feature python
- polars-io needs Python only with feature python
- polars-lazy needs Python only with feature python
- polars-plan needs Python only with feature python
- polars-python needs Python
- polars-stream needs Python only with feature python
- polars-utils needs Python only with feature python
- License
- MIT
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
DataFrame library based on Apache Arrow Python bindings |
1,729,523 downloads over 30 days | 639 | 40,285 | 0.55.2 | GPU support unknown | Binds native code: zstd-sys (feature decompress) | MIT |
|
arrow-rs Featured
Rust implementation of Apache Arrow Python bindings |
10,746,755 downloads over 30 days | 2,126 | 3,664 | 60.1.0 | GPU support unknown | Binds native code: ring (feature encryption), liblzma-sys (feature default), zstd-sys (feature default) | Apache-2.0 |
|
datafusion Featured
DataFusion is an in-memory query engine that uses Apache Arrow as the memory model |
2,992,524 downloads over 30 days | 484 | 9,578 | 55.2.0 | GPU support unknown | Binds native code: libmimalloc-sys, liblzma-sys (feature compression), zstd-sys (feature compression) | Apache-2.0 |
|
hdf5-rust Featured
Thread-safe Rust bindings for the HDF5 library. |
253,180 downloads over 30 days | 70 | 85 | 0.15.1 | GPU support unknown | Binds native code: hdf5-metno-sys, blosc-src (feature blosc), lzf-sys (feature lzf), mpi-sys (feature mpio), zfp-sys (feature zfp) | Apache-2.0 OR MIT |
|
elusion Listed
Elusion is a modern DataFrame / Data Engineering / Data Analysis library that combines the familiarity of DataFrame operations (like those in PySpark, Pandas, and Polars) with the power of SQL query building. |
27 downloads over 30 days | 0 | 144 | 9.0.0 | GPU support unknown | Binds native code: ring, openssl-sys | MIT |
|
Model conversion and quantization with no Python: reads SafeTensors, GGUF, TCF and PyTorch state dicts, writes SafeTensors, GGUF and TCF, and quantizes to Q2_K through Q8_0 and IQ4 formats, including Q4_K_M mixes. GPTQ, AWQ, NF4, FP8, EXL2 and ONNX input are not implemented. Python bindings |
23 downloads over 30 days | Not applicable | 0 | 0.2.1 | GPU support unknown | No native code found | Apache-2.0 |
|
A Rust DataFrame implementation, built on Apache Arrow |
Not measured | Not applicable | 280 | Not measured | Not measured | Not measured | Apache-2.0 |
Why FeaturedIt passes every Featured gate.
What it meets
- It has 245 active dependents and 173 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days.
- Active dependents are at 100% of their peak. Featured needs at least 50%.
- Docs are present. The release commit or a manifest ties the crate to the repository.
- No vulnerability advisory stays unpatched past the grace window. At least one version is neither a prerelease nor 0.0.x.
- The last activity is on 8 Nov 2026, 1 day ago. The rules expect an update within 1200 days. Dormancy rule
Exact rules: Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.55.2 base 300, doubled for 1729523 downloads per month, doubled for 245.17 active users: E = 1200 daysdormancy: last activity 2026-11-08, 1 days ago, E = 1200: activefeatured: featured: active_users 245.17, new_adopters 173, former_glory 1
Crates17 crates
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption245 active dependents, 173 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 245.1667 | crates.io database dump | Yes | |
| New dependents (365 days) | 173 | crates.io database dump | Yes | |
| Peak active dependents | 245 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 1 day ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-11-08 | GitHub repository | Yes | |
| Latest release | 2026-08-06 | crates.io database dump | Yes | |
| First release | 2020-06-18 | crates.io database dump | Yes | |
| Latest version | 0.55.2 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 10 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 23 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution120 releases, 1,729,523 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 120 | crates.io database dump | Yes | |
| Downloads over 30 days | 1729523 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository40,285 stars, 3,230 forks, 444 contributors, 16,277 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 40285 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 3230 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 444 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 16277 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | Binds native code: zstd-sys (feature decompress) | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | Has Python bindings: polars-error needs Python only with feature python, polars-io needs Python only with feature python, polars-lazy needs Python only with feature python, polars-plan needs Python only with feature python, polars-python needs Python, polars-stream needs Python only with feature python, polars-utils needs Python only with feature python | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 639 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.