Daft
Daft copied to clipboard
Pivot/Unpivot functionality
Is your feature request related to a problem? Please describe.
Pivot: Converts rows into columns Unpivot : Converts columns into rows
Tasks
- [ ] Pivot with explicit values passed in
- [ ] Pivot where Daft runs a
distinct()operation to get the values first - [ ] Unpivot
See also:
- Spark pivot: https://spark.apache.org/docs/3.2.1/api/python/reference/api/pyspark.sql.GroupedData.pivot.html
- Ibis
pivot_wider(or, just pivot in our case): https://ibis-project.org/reference/expression-tables#ibis.expr.types.relations.Table.pivot_wider - Ibis
pivot_longer(or, unpivot in our case): https://ibis-project.org/reference/expression-tables#ibis.expr.types.relations.Table.pivot_longer