polars

Library Featured

DataFrame library based on Apache Arrow

Checked · Sources

Downloads
1,729,523
Dependents
639
Stars
40,285
Forks
3,230
Contributors
444
Commits
16,277
Latest release
0.55.2 ·

About

From the project README ·

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:

  1. Install the latest Rust compiler
  2. Install maturin: pip install maturin
  3. cd py-polars and choose one of the following:
    • make build, slow binary with debug assertions and limited symbols, fast compile times
    • make build-debug, same as make build, but with all symbols, produces large binaries
    • make build-release, fast binary without debug assertions, minimal debug symbols, long compile times
    • make build-nodebug-release, same as build-release but without any debug symbols, slightly faster to compile
    • make build-debug-release, same as build-release but with full debug symbols, slightly slower to compile
    • make 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).

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.

polars beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
polars This page Featured

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
compressr App New

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
rust-dataframe App Archived

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 days
  • dormancy: last activity 2026-11-08, 1 days ago, E = 1200: active
  • featured: 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
Adoption245 active dependents, 173 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents245.1667crates.io database dumpYes
New dependents (365 days)173crates.io database dumpYes
Peak active dependents245crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 1 day ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-11-08GitHub repositoryYes
Latest release2026-08-06crates.io database dumpYes
First release2020-06-18crates.io database dumpYes
Latest version0.55.2crates.io database dumpYes
Days the oldest outside issue waits for a reply10GitHub repositoryYes
Maintainer replies over 365 days23GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution120 releases, 1,729,523 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases120crates.io database dumpYes
Downloads over 30 days1729523crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository40,285 stars, 3,230 forks, 444 contributors, 16,277 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars40285GitHub repositoryYes — one part of the repository route
GitHub forks3230GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account444GitHub contributorsYes — one part of the repository route
Commits on the default branch16277GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseMITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesGPU support unknowncrates.io database dumpNo
What shows each backendno dependency or feature matches a backend rowcrates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: zstd-sys (feature decompress)crates.io database dumpNo
Python bindings, from direct dependencies of listed cratesHas 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 pythoncrates.io database dumpNo
Crates that depend on a listed crate directly639crates.io database dumpNo

Corrections and review history

Report a correction

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.