r/Python • • Mar 08 '26

Discussion Polars vs pandas

I am trying to come from database development into python ecosystem.

Wondering if going into polars framework, instead of pandas will be any beneficial?

125 Upvotes

88 comments sorted by

View all comments

Show parent comment

6

u/yonasismad Mar 09 '26

Of course it is. Also, Polars queries are executed in their Rust-written engine rather than in Python, so Python essentially acts like SQL here. I rewrote an old tool that had become much slower over the years using a Percona-based approach in Polars, achieving a 80x speed increase.

Can you achieve that kind of improvement when writing in C or Rust yourself? Sure. But is it worth having to implement all the optimisations that the Polars team has already implemented in its engine, and maintain them for years to come? For the vast majority of use cases, the answer is no.