Live data from Hacker News

Pandas Should Go Extinct

eddie.codes

41–50 of 105 posts

Re: Pandas Should Go Extinct

#41
post #38

Nice post but they quickly disregard Dask, don't explain why, don't test it, even exclude it from the benchmark they quote. I don't know if is the better answer, but it seems worth testing if you want a balance approachable + scalable. That's kind the thing Dask was meant to do.

We run Dask distributed for contents in what their chart covers (10TB+ with 4+ physical hosts) and it's a problem that can't really be discussed without well defined drive read or network latency limitations (if non-local storage). We've found defining recordsize, raid and other filesystem patterns to have an equal or larger impact in itself. Pandas is great because it allows us to validate on a sampling or smaller time window dataset, and then the same engineers can use a very similar implementation for Dask distributed through their scheduler tool.

While throwing hardware at problems isn't always a reasonable solution, it's trivialized to discuss this without IOPS or other read limitations.. and the nvme enterprise market is rapidly developing making this change quickly.

Re: Pandas Should Go Extinct

#44
I'm in the middle of wrapping up the edits for Effective Pandas 3rd Edition. (I also wrote a Polars book and just wrapped up a weeklong training session on pandas this week.)

Pandas is not perfect, it has a bunch of warts. But it is good enough for most. (And many of those folks are using Excel or tableau or power bi... These were the types I was training this week).

If you have medium data, migrating from pyarrow backed pandas to duck or Polars is trivial.

Re: Pandas Should Go Extinct

#45
The reality is most of the pandas audience don't care about performance. Whenever performance is in the question people have always used polars, duckdb, dask etc. These users are usually software engineers and not data analysts. Agreed, that there is a real gap in latency and performance though!

Re: Pandas Should Go Extinct

#46
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.

Most folks just need to learn how to use pandas well and that will open enough doors. Then they can move to polars or duck if needed.

Re: Pandas Should Go Extinct

#47

In my opinion a better argument to stop using pandas is the very unintuitive API pandas have. Additionally, a slight change in the query can force you to restructure the whole query (change all lines), while in Polars (and tidyverse in R) it's just a simple one-line change.

If you learn to write pandas correctly you end up writing it very similar to polars (or tidyverse).

I agree that the API has warts, though typically it is more concise than polars.

Re: Pandas Should Go Extinct

#48

Strongly disagree with the author. For dumb simple select group by OLAP queries on medium data ? Sure clickhouse local or duckdb works perfectly well. But if you need to construct dataset ? Or process existing dataset, do heavy filtering, transformation, reshaping, splitting? The proper ETL work, then pandas is really the perfect use case. And pandas can work with small memory footprint as well, its actually trivial…

Use pandas if you want advanced analytics, visualization, or ml.

Use SQL if you need to move data around.

Re: Pandas Should Go Extinct

#49

In my opinion a better argument to stop using pandas is the very unintuitive API pandas have. Additionally, a slight change in the query can force you to restructure the whole query (change all lines), while in Polars (and tidyverse in R) it's just a simple one-line change.

If you learn to write pandas correctly you end up writing it very similar to polars (or tidyverse). I agree that the API has warts, though typically it is more concise than polars.

The problem is a small change in the question can force you to make huge changes in the code in pandas. I recently gave some examples in my blog [1]. E.g. compare the last two code blocks, where the small change is just that the median is taken within countries. This requires several line changes in pandas.

[1]https://bjarkehautop.github.io/Website/blog/data-wrangling-t...

Re: Pandas Should Go Extinct

#50

Sup Eddie, the actual motivating example is we finally nixed Pandas from Data Ingestion, now reading excel files takes 2 seconds instead of 2 minutes. However unfortunately your > TODO: rewrite this entire service remains.

Rewriting pandas to polars is relatively trivial for most tasks these days. Especially if you wrote your pandas code correctly.

I still prefer (and use) Pandas for EDA. I think matplotlib integration is a better choice for most viz.

Also, I'm probably in the top 3-5 worldwide for number of folks I've trained with pandas. I offer Polars training and there is little demand for it.

Post reply on HN