narwhals
narwhals copied to clipboard
[Enh]: Add `pivot` to Arrow
We would like to learn about your use case. For example, if this feature is needed to adopt Narwhals in an open source project, could you please enter the link to it below?
No response
Please describe the purpose of the new feature or describe the problem to solve.
Implement the pivot function for Arrow. Discovered as missing in #2177.
Suggest a solution if possible.
No response
If you have tried alternatives, please describe them below.
No response
Additional information that may help us understand your needs.
No response
thanks - this may need implementing a bit manually as in the last example from https://docs.pola.rs/api/python/stable/reference/dataframe/api/polars.DataFrame.pivot.html
Somewhat recently, pyarrow added (pa.compute.pivot_wider) that might help.
Pretty classic pyarrow to manage to not add this as a method on pa.Table 🙃
Added high prio label as it was requested in discord as well - I think it is both in scope and doable (must double check performance though 🙈)