For years the choice was simple to describe: pandas is everywhere and easy to start with, Polars is much faster and stricter. In October 2026 both released new versions, and the gap narrowed. pandas 3.1 added Polars-style select, filter and pd.col expressions and a parallel CSV reader, while Polars 2.1 learned to spill huge group-bys to disk and filled out its SQL support. This guide compares them as they stand today, with our own timings.
The same pipeline in both
Here is a typical analysis: read a sales file, keep one region, compute revenue, and total it by day. Both versions run as written on pandas 3.1 and Polars 2.1 and return the same 24 rows.
import pandas as pd
sales = pd.read_csv("sales.csv")
north = (
sales
.filter(pd.col("region") == "North")
.assign(revenue=pd.col("amount") * pd.col("qty"))
.groupby("day", as_index=False)
.agg(revenue=("revenue", "sum"), orders=("id", "count"))
.sort_values("revenue", ascending=False)
)import polars as pl
north = (
pl.scan_csv("sales.csv")
.filter(pl.col("region") == "North")
.with_columns(revenue=pl.col("amount") * pl.col("qty"))
.group_by("day")
.agg(pl.col("revenue").sum(), orders=pl.len())
.sort("revenue", descending=True)
.collect()
)The biggest difference is not the method names but lazy execution. Polars' scan_csv builds a plan and only runs it at collect(), so it can skip columns and rows it does not need. pandas always runs each step immediately.
Speed: our benchmark
We ran common operations on the same 2-million-row table, 90 MB as CSV, on a small 2-core cloud machine, taking the best of five runs. Bars show how many times faster Polars was.
Our test: 2 million rows, 5 columns, 2-core machine, best of five runs. On machines with more cores Polars usually gains more, because it parallelises most operations.
| Operation | pandas 3.1 | Polars 2.1 |
|---|---|---|
| Read a 90 MB CSV | 0.15 s | 0.15 s |
| Filter on two conditions | 0.050 s | 0.007 s |
| Group by region and day | 0.127 s | 0.023 s |
| Join to a 4-row table | 0.217 s | 0.092 s |
| Sort 2 million rows | 0.238 s | 0.198 s |
| Read, filter and aggregate in one go | 0.275 s | 0.148 s |
For a file of this size, both are fast enough that the difference rarely matters in a notebook. It matters when the same code runs every hour in a pipeline, or when the data is ten or a hundred times bigger.
Head to head
pandas 3.1
The standard- First release
- 2008
- Execution
- eager, mostly single-threaded
- Index
- row labels
- Works with almost every Python data library
- Huge number of tutorials, answers and examples
- Now has select, filter and pd.col
- Slower on large data and uses more memory
Best for exploration, small to medium data and anything that feeds plotting or machine learning libraries.
Polars 2.1
The fast one- First release
- 2020
- Execution
- lazy or eager, multi-threaded
- Index
- none
- Much faster on most operations, and handles data larger than memory
- Strict types catch mistakes early
- Built-in SQL that keeps getting more complete
- Fewer integrations, and less help online
Best for pipelines, large files and repeated jobs where speed and memory matter.
Which should you choose?
- 1
Starting out, or working with Excel users
Learn pandas first. Most courses, Stack Overflow answers and AI assistants assume it, and pandas 3.1's new syntax makes moving to Polars later easy.
- 2
Data larger than a few gigabytes
Use Polars, especially with scan_csv or scan_parquet and the streaming engine, which can now spill to disk.
- 3
Scheduled pipelines
Polars usually costs less to run and fails earlier when data types are wrong.
- 4
Machine learning and charts
Stay in pandas, or do the heavy preparation in Polars and convert at the end with to_pandas().
- 5
SQL people
Try DuckDB or Polars SQL. Both query files directly; see our guide to DuckDB 2.0.
Check your understanding
1/3Which pandas 3.1 feature makes its code look more like Polars?
pandas 3.0 added pd.col, and 3.1 added select and condition-based filter.
2/3Why can Polars skip unneeded work in a pipeline?
scan_csv and collect let Polars plan the query and read only what it needs.
3/3In our test, where was the difference smallest?
pandas 3.1's new parallel CSV reader matched Polars on our 90 MB file.
You got 0 out of 3.
Read next: what's new in pandas 3.1, what's new in Polars 2.1, DuckDB 2.0, the pandas cheat sheet and the Polars cheat sheet. Moving from spreadsheets? Start with pandas for Excel users.
Sources: pandas 3.1.0 release notes (22 October 2026); Polars blog, "Announcing Polars 2.1" (27 October 2026); our own benchmark with pandas 3.1.0, Polars 2.1.0 and PyArrow on Python 3.13 on a 2-core machine. Timings are indicative; test on your own data and hardware.
