Live data from Hacker News

Pandas Should Go Extinct

eddie.codes

11–20 of 105 posts

Re: Pandas Should Go Extinct

#11
Polars seems nice but in my experience using it, the "lazy" APIs would still immediately materialize a ton of stuff in memory and had very spotty support on what data formats and storage integrations were possible with scan_* functions (though that was half a year ago and the support is slowly improving). It's frustrating, I mean really frustrating, to think I could solve a lot of my "scan through heinous amounts of data without any memory hungry things like window aggregations without blowing out my memory" with Polars and then watch my scan_thisorthat() call result in instant memory usage ballooning.

DuckDB on the other hand is wonderful and truly doesn't use any more memory than it really needs to.

Re: Pandas Should Go Extinct

#13
Makes sense, especially with AI coding tools the rewrite and familiarity arguments hold less water. Similar for the rustify everything crazy.

The problem is, orgs who see themselves as big data orgs want to act that way, even if they're medium data. "But we'll need it when we grow", "we need to know the state of the art tools"

Re: Pandas Should Go Extinct

#14
post #3

> People typically start with Excel and graduate to Pandas somewhere in the GB range. Pandas serves them well into the 10s of GBs range, and then they start hitting memory issues, slow computation, or become frustrated with Pandas’ baroque API. Assumes that a project moves beyond 10s of GBs. I guess 99.9% of projects that import pandas fall well below this threshold.

True, but also if Polars and DuckDB offer a similar experience with the ability to scale beyond that range, why not use them (for new projects)?

This isn't a call to arms to rewrite everything in the new shiny, just consider the new shiny for new shiny things

Re: Pandas Should Go Extinct

#16
post #10

Real link here: https://eddie.codes/posts/source-code-comments/ Something going wonky on their blog, where two posts got their links swapped.

Yep sorry, fixing now. It's what you get for being bitten by the bug to write twice in the same day

Fixed!

Re: Pandas Should Go Extinct

#18
Only in the last few years did I start using SQL properly. Before that my pipelines would live in python. Now I offload as much to the db as possible, and keep my python simple glue. I'm very happy with this compared to other methods in pandas or polars.

If I still need to do db-like things in python I think duckdb is better.

Re: Pandas Should Go Extinct

#20
post #9

Earlier quoted context omitted.

At my work I had convinced the ML pipeline engineers to switch from pandas to polars for even small ETL pipelines and there were notable performance gain with better CPU/memory utilization. If a library is performant at large datasets, it is likely performant at small ones too.

I’m not disagreeing with that statement at all. You missed my point that there are thousands of people making small Python scripts for education and personal projects everyday. In those circumstances the performance concerns are irrelevant and the ergonomics of good pandas documentation and community knowledge make it a better choice.

That inertia is not a good thing, and it's partially why there's stagnation in data science. Polars is more than mature enough in both documentation and resources for it to be a daily driver.
Post reply on HN