r/programming • • Oct 06 '26

Release of Polars 2.0

https://pola.rs/posts/release-polars-2/
115 Upvotes

17 comments sorted by

17

u/Drawhoe Oct 07 '26

What is it?

17

u/matthieum Oct 07 '26

It's essentially pandas, with an emphasis on performance & correctness/ergonomics.

The performance is achieved by having a core written in Rust, wrapped in a Python API.

The correctness & ergonomics are achieved by putting a lot of effort in APIs and diagnoses.

14

u/IanisVasilev Oct 07 '26

It's library for data frames. If you haven't done statistics, think of a table data structure with many lookup and transformation methods. Imagine if Excel and SQL had a child that was somehow more convenient than both its parents (see "10 minutes to pandas").

Unlike the ubiquitous dataframes of R or pandas of Python, this one is written in Rust™ and AI ready™ and VC-funded and all that jazz.

Since data frames are convenient, many frameworks like Spark provide their own flavor. To avoid lock-in, we have the narwhals compatibility layer which provides a unified API for pandas, polars, PyArrow, PySpark and other similar libraries.

6

u/Drawhoe Oct 07 '26

I should have posted a what is it ref. Here it is

10

u/IanisVasilev Oct 07 '26

Oh, so I should have explained that it is a monoid in the category of endofunctors.

2

u/lightnegative Oct 09 '26

The product of some people who looked at pandas and decided to rewrite it in Rust

1

u/pdpi Oct 07 '26

A rough first approximation is that Polars is a system that allows you to do sql-like queries on anything you can load as a table-like structure (a DataFrame, in technical terms). It supports reading data from a bunch of sources.

2

u/Drawhoe Oct 07 '26

Thanks. Yeah I could see it being useful.

-1

u/Iamonreddit Oct 07 '26

It is a distributed data processing framework by the looks of it, similar to Spark.

6

u/daidoji70 Oct 07 '26

Uhh more just a dataframe library like Pandas. It was built as a replacement for Pandas and dataframes also exist in Spark and Databricks. They're more like shittier databases that are closer to the language being used that are widely used in data science and analysis work.

2

u/SaltyMN Oct 08 '26

This and pyspark put food on my table. More sensible defaults is great, love being able to use SQL as well. 

2

u/Maybe-monad Oct 08 '26

I'd rather raw dog SQL with DuckDB

2

u/[deleted] Oct 07 '26

[removed] — view removed comment

4

u/theAndrewWiggins Oct 07 '26

3-line diff

This is not true at all lmao. They're very much intentionally not pandas compatible. Only some very basic stuff will work that way.

1

u/IanisVasilev Oct 08 '26

He didn't say how long those 3 lines would be...

1

u/programming-ModTeam Oct 08 '26

No content written mostly by an LLM. If you don't want to write it, we don't want to read it.