Pythie
CategoriesTrending
An open index of Python tools.Pythie’s IndexLegal noticePrivacyData: PyPI (package metadata; download statistics under CC BY 4.0, via ClickHouse), deps.dev (CC BY 4.0), GitHub, OSV.

polars

2.2.0ActivePythie’s Index: 90

Blazingly fast DataFrame library

Actively maintained. Last release 5 days ago, commits in 26 of the last 26 weeks. A safe choice.

Data Analysis & DataFramesPerformance & Low-level
$pip install polars
pola-rs/polarsHomepageDocsPyPI

Polars logo

crates.io Latest Release PyPi Latest Release NPM Latest Release R-multiverse Latest Release DOI Latest Release

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:

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).

Popularity

Downloads / month
73.3M
GitHub stars
40.6K
Downloads, last 7 days
19.2M+11%
Stars, last 7 days
–
Direct dependents
3.3K
All dependents
4.6K

Pythie’s Index

How it works
90

Healthy

Maintenance, out of 100

  • Recent release

    last release 4 days ago

  • Commit activity

    26/26 weeks with commits

  • Release cadence

    22 releases in 12 months

  • Issues & PRs handled

    no data

  • Contributor spread

    18 authors in last 100 commits

  • OpenSSF Scorecard

    6.1/10

Commits, last 26 weeks1776

Releases

Latest
2.2.0
Released
Nov 24, 2026
Releases, 12 months
22
First release
Mar 15, 2021

Compatibility

Requires Python
>=3.11
Tested on
3.11 · 3.12 · 3.13 · 3.14
License
MIT (Permissive)

Keywords

dataframearrowout-of-coredataframe-librarydataframesrustpythonpolars

Alternatives

Use instead of polars: tools that do the same job, closest first.

Compare with pandas →Compare with ibis-framework →Compare with datafusion →Compare all 4 →

  • pandas3.1.1ActivePythie’s Index: 88

    Powerful data structures for data analysis, time series, and statistics

    Data Analysis & DataFramesScientific Computing50.6K720.9M/moReleased Nov 4, 2026
  • ibis-framework12.0.0ActivePythie’s Index: 71

    The portable Python dataframe library

    Data Analysis & DataFramesDatabases & ORMs6.7K3.4M/moReleased Feb 7, 2026
  • datafusion55.0.0ActivePythie’s Index: 80

    Build and run queries against data

    Data Analysis & DataFramesDatabases & ORMs612714.1K/moReleased Oct 12, 2026
  • duckdb2.0.1ActivePythie’s Index: 82

    DuckDB in-process database

    Databases & ORMsData Analysis & DataFrames20789.7M/moReleased Nov 24, 2026
  • daft0.7.26ActivePythie’s Index: 82

    Distributed Dataframes for Multimodal Data

    Data Analysis & DataFramesMachine Learning5.9K509K/moReleased Nov 4, 2026
  • modin0.37.1MaintainedPythie’s Index: 28

    Modin: Make your pandas code run faster by changing one line of code.

    Data Analysis & DataFramesPerformance & Low-level10.4K1.2M/moReleased Oct 2, 2025

Works well with

Use together with polars: extensions, drivers, servers and companion tools.

  • pyarrowPythie’s Index: 91Python library for Apache Arrow430.1M downloads/mo
  • narwhalsPythie’s Index: 86Extremely lightweight compatibility layer between dataframe libraries160M downloads/mo
  • fastexcelPythie’s Index: 72A fast excel file reader for Python, written in Rust4.5M downloads/mo
  • pyreadstatPythie’s Index: 83Reads and Writes SAS, SPSS and Stata files into/from pandas and polars data frames.2.5M downloads/mo
  • connectorxPythie’s Index: 731.7M downloads/mo
  • dataframelyPythie’s Index: 91A declarative, polars-native data frame validation library1.3M downloads/mo

Same project

Also published from pola-rs/polars.

  • polars-runtime-32Blazingly fast DataFrame library
  • polars-lts-cpuBlazingly fast DataFrame library
  • polars-runtime-compatBlazingly fast DataFrame library
  • polars-runtime-64Blazingly fast DataFrame library