Data Science & Analysis

polars

The new kid that makes pandas users wonder why they waited so long.

Install it: pip install polars

What does it do?

Polars does much of the same row-and-column data wrangling as pandas, but it was built from scratch in the Rust programming language specifically to be dramatically faster on large datasets, using every processor core available rather than just one. Picture two people sorting the same warehouse of boxes — one working alone, the other directing a whole team simultaneously; Polars is the team approach. For data too big to comfortably fit in a spreadsheet, that speed difference can turn a multi-minute wait into a couple of seconds.

See it in action

This code builds a small table of regional sales figures, keeps only the rows for one region, and adds up the sales for it.

import polars as pl

df = pl.DataFrame({
    "region": ["East", "West", "East", "West"],
    "sales": [100, 150, 200, 130],
})
result = df.filter(pl.col("region") == "East").select(pl.col("sales").sum())
print(result)

Why would a non-developer care?

As datasets keep growing — more sensors, more transactions, more logged clicks — the tools built years ago for smaller data start to show their age, and waiting minutes for an analysis to finish is a real, frustrating cost to a business trying to move fast.

Real-world examples

Polars has been rapidly adopted by data teams frustrated with pandas slowing to a crawl on datasets in the tens of millions of rows, and benchmarks showing multi-fold speed improvements have driven much of its fast-growing adoption since its public release in 2020. Without faster alternatives like this, teams would either wait longer for results or reach for heavier big-data infrastructure than the job actually required.

Who uses it

Data analysts and engineers working with datasets large enough that pandas starts to feel sluggish, but not so large they need a full distributed computing cluster.

How it compares to alternatives

Polars is pandas’ most talked-about modern rival, trading some of pandas’ enormous ecosystem of tutorials and compatible tools for raw speed; for datasets that don’t fit on one machine at all, Dask remains the more common choice.

Fun fact

Polars is built on the Apache Arrow columnar memory format and written in Rust, a language prized for combining near C-level speed with strong safety guarantees — a deliberate choice by creator Ritchie Vink to avoid the performance ceilings pandas hits.

New to Python and want to actually try libraries like this yourself?

Find a beginner-friendly course

Related libraries