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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
