Skip to content

Polars

A fast library for working with tables of data (DataFrames), written in Rust with Python and other bindings.

Stars
40.2k
Forks
3.2k
Licence
MIT
Language
Rust
Last update
4 days ago
Type
Library

What it is

Polars is a query engine for DataFrames, which are tables of rows and columns used to clean, filter, group and summarize data. It is written in Rust and is meant to be fast and easy to use. People use it from Python, Rust, Node.js, R, or SQL to analyze datasets.

  • Filter and group a large Parquet file of orders and sum totals per customer
  • Run a lazy query with scan_parquet and collect it once the plan is set
  • Process a dataset larger than RAM using collect(engine='streaming')
  • Query DataFrames with SQL through the bindings

Great for

  • Python users who analyze large CSV or Parquet files and find slower tools too slow
  • Data analysts who want lazy queries that the engine can optimize before running
  • People working with datasets larger than their computer's memory, using the streaming engine
  • Developers who want a native Rust DataFrame library

Not ideal for

  • Beginners who only need a spreadsheet-style tool (a GUI spreadsheet fits better)
  • Projects that need a mature pandas-compatible API for existing code, since the README does not claim drop-in compatibility
  • Users who need GPU acceleration on non-NVIDIA hardware, since the README only mentions NVIDIA GPU support
Step-by-step guide: how to use PolarsInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Python

    Install Polars from PyPI

    pip install polars
  2. 2

    Run it

    • Install with pip install polars
    • Import it in Python with import polars as pl
    • Load a file with pl.scan_parquet("yourfile.parquet") to create a lazy query
    • Add filters, group_by, and agg steps to the query
    • Call .collect() to run the query and get a result
  3. 3

    Get the most out of it

    • Use lazy scan functions such as scan_parquet so the query optimizer can work before execution
    • Use collect(engine='streaming') for data that does not fit in memory
    • Write custom I/O and expression plugins to extend Polars natively, as described in the user guide
    • Check the user guide for optional feature flags for extra dependencies
    • Use the bindings for Node.js, R, or SQL if those fit your stack

Downloads

Strengths

  • Multi-threaded, vectorized execution written in Rust
  • Lazy queries are optimized automatically before running
  • Uses the Apache Arrow columnar format for efficient data sharing

Trade-offs

  • The README is truncated and does not detail every API or limitation
  • Some features such as GPU support are optional and need extra setup described in the user guide
  • Building from source requires a Rust compiler and maturin, which is more involved than pip install

How it compares

ProjectStarsTypeLevelUpdatedBest for
polars (this)40.2kLibraryintermediate4 days agoPython users who analyze large CSV or Parquet files and find slower tools too slow
duckdb42.7kLibrarybeginner4 days agoAnalysts who want to run SQL directly on CSV, Parquet, or JSON files

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.