You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "willshiao (via GitHub)" <gi...@apache.org> on 2023/11/07 23:50:38 UTC

Re: [I] [Python] How to do arrow table group by and split? [arrow]

willshiao commented on issue #14882:
URL: https://github.com/apache/arrow/issues/14882#issuecomment-1800437413

   Also ran into this issue, and totally agree that it would be an useful addition to PyArrow. But in the meantime, a workaround is to convert it to a Polars dataframe (see [`polars.from_arrow`](https://pola-rs.github.io/polars/py-polars/html/reference/api/polars.from_arrow.html)), which is mostly zero-copy. You can then use the [`partition_by`](https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.partition_by.html) function. It's much faster than doing the equivalent operation in Pandas.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org