| ▲ | Release of Polars 2.0(pola.rs) |
| 347 points by simicd 8 hours ago | 72 comments |
| |
|
| ▲ | sureglymop 2 hours ago | parent | next [-] |
| I've used Polars before and can only recommend it. It's like you get a really good 'query planner' like a DB would give you, but for your notebooks/scripts/etc. Much better than pandas imo. |
| |
| ▲ | jadbox 42 minutes ago | parent [-] | | Why use Polars over just postgresql or sqlite? | | |
| ▲ | cle 5 minutes ago | parent | next [-] | | It is optimized for analytic workloads (default in-mem columnar layout), whereas PG and sqlite are OLTP DBs. It's going to be insanely faster for those use cases. | |
| ▲ | entropicdrifter 35 minutes ago | parent | prev [-] | | Because those are databases? Polars is a data processing engine, not a database. They have different uses. |
|
|
|
| ▲ | popularonion 2 hours ago | parent | prev | next [-] |
| I worked on benchmarking in the past, including TPC benchmarks. When you see a blog post like this, never interpret it as “database A is X% faster than database B”, there are just too many factors. It’s more like “we put focused work into performance improvements and we expect certain workloads to perform better than the previous release”. This seems like a good project, and benchmarking is a good way for a development team to iterate on performance. Just want to get my take out there. |
| |
| ▲ | andriy_koval 2 hours ago | parent [-] | | But something like TPC is diverse enough to show whole picture?.. Especially compared to popular clickbench. | | |
| ▲ | orlp an hour ago | parent [-] | | I think the person you're replying to is more so saying that by choosing the right queries, machine, disk setup, caching, settings, thread count, RAM amount, etc, you can get quite different results. There is a reason everyone always wins their own benchmarks, and it doesn't even have to be dishonest - you optimize and iterate for your own benchmark whereas everyone else just gets one shot to do well out of the box. I tried my best to be as transparent and fair as possible, running everyone with out-of-the-box settings on a third party's queries (DuckDB), a third party's data generator (tpcgen-rs, from the DataFusion guys), on a stock setup available to everyone (AWS machines). The one exception is that we also ran Polars locked to 32 threads on the large machine (in addition to the out-of-the-box setup), which was to highlight we can do a lot better on small data. We still suffer from a relatively high constant overhead on very high CPU count machines if the data isn't large enough, but I'm working on fixing that. It's possible that DuckDB / DataFusion have similar scaling issues with high thread counts and would do better with 32 threads as well, I didn't test that. | | |
| ▲ | andriy_koval an hour ago | parent [-] | | > choosing the right queries, machine, disk setup, caching, settings, thread count, RAM amount, etc, you can get quite different results. I think it is over-complication. TPC results used to be reported on some standard machines you can order, and now every one uses AWS metal for that. Its Ok if project has configs tuned to popular machine, I think it is representative approach. |
|
|
|
|
| ▲ | gozzoo 6 hours ago | parent | prev | next [-] |
| I'm not following the trends closely, but has Polars become a full replacement for Pandas? Are there use cases where one is better suited than the other? |
| |
| ▲ | desipenguin 6 hours ago | parent | next [-] | | From recent Python Bytes podcast (https://pythonbytes.fm/episodes/show/496/a-lake-house-in-sea...) > 1 Billion Row Challenge benchmark: Pandas took 4m28s vs. Polars 5.04s and DuckDB 5.19s — DuckDB also used 19x less memory Python Vs Rust : In terms for speed - No comparison (The above episode transcript has a link to blog post titled "Pandas should go extinct" ) | | |
| ▲ | jszymborski an hour ago | parent [-] | | I've nearly entirely switched to DuckDB for anything more than like 500 or 1,000 rows or if there are a tonne of columns. Polars is great, but I'm just too used to the Pandas API to use it as a replacement for the cases where DuckDB is overkill. | | |
| ▲ | entropicdrifter 9 minutes ago | parent [-] | | That's a shame, because Pandas has a really quirky/legacy-burdened API and Polars is super clean by comparison. As someone who had Spark and Pandas experience before switching, Polars felt like Pyspark without the added mental overhead of needing you to think about multi-worker-node parallelism |
|
| |
| ▲ | esco2292 6 hours ago | parent | prev | next [-] | | Polars is effectively a full replacement for Pandas for 99.9% of all cases. The only exception I'm really aware of is if you're working with geospatial data, as there isn't yet a "Geopolars" equivalent of the commonly used "Geopandas". However, Geopolars is still in active development and should eventually be production ready. | | |
| ▲ | pattar an hour ago | parent | next [-] | | There is a geospatial package for duckdb though which is pretty slick. It is actually how I first learned of duckdb. We were dealing with nationwide parcel datasets and need to apply transformations nationwide and save out to more parquet files. It was easier and cheaper to replace all of the pandas workloads with duckdb. | |
| ▲ | adeptima 5 hours ago | parent | prev [-] | | it’s on the correct path. i use rust for geo spatial and the gap with c, c++ closing rapidly or negligible in most cases from https://github.com/pola-rs/geopolars/tree/main Comparison with GeoPandas Imitation is the sincerest form of flattery! GeoPandas — and its underlying libraries of shapely and GEOS — is an incredible production-ready tool. GeoPolars is nowhere near the functionality or stability of GeoPandas, but competition is good and, due to its pure-Rust core, GeoPolars will be much easier to use in WebAssembly. | | |
| |
| ▲ | lmeyerov 5 hours ago | parent | prev | next [-] | | We were able to do a full port of GFQL from pandas to polars, cypher graph queries on dataframes, including both our CPU + GPU modes, and hit massive speedups: https://www.graphistry.com/blog/cypher-on-polars-cpu-gpu-gra... It's been impressive! | |
| ▲ | niltecedu 5 hours ago | parent | prev | next [-] | | Yes and no, its not replacing the reason why pandas was popular ie data scientists, but it a full replacement of its pipeline usage, And I would saw also beating out spark | |
| ▲ | 392 6 hours ago | parent | prev | next [-] | | my understanding is Polars is faster, scales better without using external solutions, better API, +Rust. Pandas wins if you want to use what the vast majority of folks are using and have used in the past. Probably has a more complete set of helpers / recipes for the little things you bump into when using it thoroughly, but in the age of LLMs, I think that's minor. | | |
| ▲ | vovavili 6 hours ago | parent | next [-] | | >Pandas wins if you want to use what the vast majority of folks are using Vast majority of skilled developers are now using Polars, unless they are constrained by lack of Narwhals support in their third-party library of choice (e.g. Great Expectations, SHAP). That's the more important trend to follow. | |
| ▲ | derriz 5 hours ago | parent | prev | next [-] | | It’s the API that gave me the push to leave Pandas. 10 or more years of occasional Pandas use and I still had to google for any non-trivial queries. In that regard, I’m still waiting for a credible jq replacement… | | |
| ▲ | bitbang 3 hours ago | parent | next [-] | | Replacement for jq: https://github.com/01mf02/jaq | |
| ▲ | boltzmann64 4 hours ago | parent | prev [-] | | Learn SQL and interface with Duck. You will be 100x faster than Pandas/Polaris duo at fraction of memory. Also SQL is supported literally everywhere with a much more capable than Pandas API. Duck outputs to a Pandas Dataframe, but just treat that like a dictionary. Do all your processing, filtering and aggregation in Duck. Also, try fx.wtf as a replacement for jq. it comes with a in-built tui viewer that supports vi-keybindings. Ecmascript is built into fx.wtf so you can query the JSON with JS notation (where JSON was born). You can use any JS functions including map/reduce/filter or perform any kind of transformation instead of learning jq dsl that you will forget tomorrow. | | |
| |
| ▲ | mhh__ 4 hours ago | parent | prev [-] | | Avoiding pandas developers is a great reason to use polars imo |
| |
| ▲ | seemaze 4 hours ago | parent | prev | next [-] | | It has been for me. I greatly prefer the API, it fits my mental model much better. Give it a try! | |
| ▲ | minimaxir 4 hours ago | parent | prev | next [-] | | See "Pandas should go extinct": https://news.ycombinator.com/item?id=49668198 tl;dr yes | |
| ▲ | bmitc 5 hours ago | parent | prev [-] | | There are awkward things. For example, if you ingest a nanosecond resolution timestamp, there's no way to re-export that out of the Polars dataframe with nanosecond resolution. |
|
|
| ▲ | tomrod 3 hours ago | parent | prev | next [-] |
| Well done, Polars team! Everything that I build greenfield moving forward I plan to use DuckDB, Polars, or PyArrow. Pandas was a great grandfather of a project (I actually cut my OSS contrib teeth on it, how the time flies)! I'll always appreciate the improvement pandas brought over SAS. |
| |
| ▲ | genxy 3 hours ago | parent | next [-] | | If Pandas was the great grandfather, R data.frame is the great-great grandfather. R data.frames directly inspired Pandas. | | |
| ▲ | tomrod an hour ago | parent [-] | | Agreed. For its time, R was a lot of fun to play with data pipelines, visuals, Quarto, and frontier stats. It's a shame it's so hard to make it work for a large swath of production use cases. |
| |
| ▲ | sanderjd an hour ago | parent | prev [-] | | Do you have a take on when each of these three choices is the best one? I totally agree that these are the good choices, but I still find myself hesitating about which thing to reach for when! | | |
| ▲ | tomrod an hour ago | parent [-] | | Depends on need. We started using PyArrow on a reporting microservice when we realized we needed no additional functionality that pandas provided since it has better data type ergonomics. DuckDb is a great go-to for SQL based transformations when working with parquet files outside a managed system like Databricks. I want to actually test duckdb versus polars with a few lower level places like iceberg on S3. | | |
| ▲ | sanderjd an hour ago | parent [-] | | Yeah makes sense. The SQL thing has also been my differentiator (and yeah, straight up arrow if you aren't doing much transformation of the data), but now I'm curious whether polars sql might be just as good. I kind of like that duckdb allows me to work with a database file, like a sqlite db. But maybe persisting parquet (or arrow directly?) is just as good? This is why I asked someone else who is also figuring this out! |
|
|
|
|
| ▲ | therno 6 hours ago | parent | prev | next [-] |
| I use Polars 2.0(rc) to (pre)calculate billions of weather scores on https://therno.com and it has been a lifesaver Happy that I can upgrade to 2.0 final tonight. |
|
| ▲ | niltecedu 5 hours ago | parent | prev | next [-] |
| A bit surprised about the datafusion results from the post, I have tried it time and time again, but datafusion has always been the leading/trading blowers with polars for our workfloads with duckdb being vastly slower. |
| |
| ▲ | f311a 5 hours ago | parent [-] | | There are some benchmarks for the previous version https://benchmark.clickhouse.com/#system=+ti%20rud|Dusa,s|PD... | | |
| ▲ | orlp 4 hours ago | parent [-] | | Doing the benchmarks for 2.0 on the large AWS metal machines at small data sizes (SF=10) really opened my eyes that we have some low-hanging fruit in Polars when it comes to optimizing our constant overhead for smaller queries. For example our join currently does a full partition into T partitions, for each of the T threads. Overall we create T^2 partitions, which on a 192-core machine is non-trivial. Great if you have a ton of data to feed that with, but if you 'only' have a few dozen million rows it becomes rather small. This is the primary reason we saw in the benchmarks that Polars pinned to 32 threads beats 192 thread Polars at SF=10. I'll be working on improving that soon. I expect that to have a big impact on SF=10, and a decent impact on ClickBench, which sits between SF=10 and SF=100 in terms of rows. |
|
|
|
| ▲ | sgarland 7 hours ago | parent | prev | next [-] |
| TIL that Polars supports SQL. Amazing. |
| |
| ▲ | brap 4 hours ago | parent | next [-] | | At what point can we say that Polars is basically an in-memory database? (Genuine question) | | |
| ▲ | sanderjd an hour ago | parent [-] | | I think it always has been? All of these data frame libraries are very much akin to olap databases. |
| |
| ▲ | dist-epoch 4 hours ago | parent | prev [-] | | It did since the first releases, but it was limited. Now it seems they want to go head to head with DuckDB. | | |
| ▲ | efromvt 4 hours ago | parent [-] | | Love competition in the local data SQL space, makes everyone better |
|
|
|
| ▲ | jdefting 2 hours ago | parent | prev | next [-] |
| I would be interested in seeing memory usage differences in these benchmarks. I’ve had issues with excessive memory usage in polars compared to DuckDB. I’m guessing most of the this disparity should be solved by the steaming engine. |
| |
| ▲ | kaathewise 2 hours ago | parent | next [-] | | Polars relies on threading heavily, even when streaming files. And it appears that each thread loads quite a bit of memory. I've encountered OOM issues when incrementally reading Arrow IPC files which had very large batches. Fixed it by setting $POLARS_MAX_THREADS to 1, which amusingly also improved the performance on my very narrow task. | |
| ▲ | orlp 2 hours ago | parent | prev [-] | | Peak memory usage per query is in the raw data (in `results/`) in the repository: https://github.com/pola-rs/polars-2.0-benchmark/. |
|
|
| ▲ | patrick_rtk 34 minutes ago | parent | prev | next [-] |
| amazing project ! |
|
| ▲ | dkgs 7 hours ago | parent | prev | next [-] |
| A coincidence with the fact duckdb is supposed to release 2.0.0 very soon? :) |
| |
| ▲ | orlp 7 hours ago | parent | next [-] | | Actually yes. We had already been planning to do 2.0 for a long time. We originally said we'd move on from 1.x quickly when released 1.0 but ended up staying at 1.x much longer than intended. From a quick check our first PRs were merged to the 2.0 branch in June: 2026-06-17T21:27:51Z #27993 chore: Stop coercing `pl.col(...)` to selector ...
2026-06-18T14:19:26Z #27996 chore!: Replace multi-seed hash API with a single seed
2026-06-19T07:05:11Z #27991 chore(python!): Remove `Expr.flatten` function
| |
| ▲ | m00dy 7 hours ago | parent | prev [-] | | Are they competing for something? | | |
| ▲ | vindex10 6 hours ago | parent [-] | | > first class SQL support, which together with the performance improvements has Polars leading DataFusion and DuckDB in TPC-H and TPC-DS1 benchmarks, Apparently about something )) |
|
|
|
| ▲ | hnd9q09qk4 7 hours ago | parent | prev | next [-] |
| Thing I care about most is whether the old eager-vs-lazy footguns got cleaned up. Half my bugs were a stray collect() in a loop killing the query plan. |
|
| ▲ | breezybottom 2 hours ago | parent | prev | next [-] |
| Looks like the Claude skill hasn't been updated |
|
| ▲ | dartharva 6 hours ago | parent | prev | next [-] |
| Been using polars for over a year now, it is fantastic. |
|
| ▲ | Kinrany 6 hours ago | parent | prev | next [-] |
| How does Polars relate to DataFusion these days? There's no reason for them not to converge into a single ecosystem, is there? |
| |
|
| ▲ | bjourne 2 hours ago | parent | prev | next [-] |
| Pandas is amazing, Polaris is amazinger! |
|
| ▲ | Centigonal 4 hours ago | parent | prev | next [-] |
| out of core sounds awesome! biggest thing that forced me to switch from pandas/polars to other solutions back in the day. |
|
| ▲ | Vaslo 6 hours ago | parent | prev | next [-] |
| My team is all moving over to polars and DuckDB |
| |
|
| ▲ | yshvrdhn 3 hours ago | parent | prev | next [-] |
| what about daft project ? |
|
| ▲ | jt-s 3 hours ago | parent | prev | next [-] |
| Although I find pandas a bit aggravating in many ways, for myself and my equally idiotic laboratory scientist pals, seems that it is the default way you might interface with other libraries like SciPy (i.e. they expect things as NumPy arrays or pandas dataframes). Is this a real issue or will most things happily accept a polars dataframe? We don’t work with such large datasets that speed is likely a huge concern tbh. |
| |
| ▲ | 0cf8612b2e1e 2 hours ago | parent | next [-] | | One nice development in this space is the narwhals library - it is a dataframe agnostic library. It allows you to seamlessly switch between pandas, polars, modlin, or any of the variations coming out. Narwhal is still fairly new, but I expect its usage to spread since most packages only require rudimentary dataframe manipulation (set a value, math been these two columns, etc) where the limited api surface is not a problem. Narwhals is also a much cheaper dependency to add than polars/pandas/etc so it is a somewhat easy sell to incorporate. | |
| ▲ | niksmather 3 hours ago | parent | prev [-] | | You can convert to numpy using .to_numpy(). It's also got much better support for more complex array shapes (e.g. each row storing an array). At least it did last time I used pandas! |
|
|
| ▲ | tonyhart7 6 hours ago | parent | prev | next [-] |
| finally long time coming cant wait to upgrade my Quant trading bot |
| |
| ▲ | geodel 2 hours ago | parent | next [-] | | Not to take away any prop knowledge from you but I've been playing with some very very early ideas of getting some market data, save in duckdb do some analysis, create some kind of portfolio and buy/sell via API and nowhere close implementation. Yours seems rather established platform. Would you be able to share kind of high level architecture of bot? | | |
| ▲ | tonyhart7 31 minutes ago | parent [-] | | use a higher timeframe to understand the market phase, and a lower timeframe for entries. when I started, I tried mimicking a human trader. if you want to expand into full quant, be aware of overengineering (past mistake of mine). you can copy or mimic institutional desk strategies. most of the concepts are fine, but the devil is in the details. sometimes you open too early or too late. finding that sweet spot, where you don’t want a lot of drawdown, requires a lot of fine-tuning. |
| |
| ▲ | m00dy 6 hours ago | parent | prev [-] | | I'm also using it for BlockRotate, it's time to upgrade. | | |
|
|
| ▲ | mrtimo 5 hours ago | parent | prev [-] |
| I can use pandas to clean a dataset, but each cleaning task is usually one line of code. OTOH, With DuckDB with one SQL statement I can replace 40+ lines of polars/pandas. You may reply, SQL isn't as easy to understand! Fair point, it's a declarative language... which is why I use Malloy. Malloy is to TypeScript as Javascript is to SQL. Malloy is much easier to read and write (just as TypeScript is) because it has a built in semantic model -- all the joins, measures, and dimensions are done in one place. Here is an example [1] of visualizing college football games. Here are all the queries, and semantic model that power all the visualizations [2] Here is the AI generated typescript/react that does the visualizations [3]. The Malloy ecosystem has Malloyyo and Publisher which are replacements for PowerBI and Tableau and Looker. Here is another example for visualizing global trade [4]. [1] - https://mrtimo.github.io/cfb-games/games-2026.html?week=Week...
[2] - https://github.com/mrtimo/cfb-games/blob/main/drives.malloy
[3] - https://github.com/mrtimo/cfb-games/blob/main/dashboards/gam...
[4] - https://tradeexplorer.org/ |