Eventual-Inc / Daft

Distributed DataFrame for Python designed for the cloud, powered by Rust
https://getdaft.io
Apache License 2.0
1.79k stars 108 forks source link

[CHORE] Allow multiple group_bys for pivot #2242

Closed colin-ho closed 3 weeks ago

colin-ho commented 3 weeks ago

Currently df.pivot only accepts a single group_by column, this PR adds functionality to use multiple columns.

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 85.64%. Comparing base (c57aaad) to head (aeee2dc).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2242/graphs/tree.svg?width=650&height=150&src=pr&token=J430QVFE89&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc)](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2242?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc) ```diff @@ Coverage Diff @@ ## main #2242 +/- ## ========================================= + Coverage 0 85.64% +85.64% ========================================= Files 0 71 +71 Lines 0 7642 +7642 ========================================= + Hits 0 6545 +6545 - Misses 0 1097 +1097 ``` | [Files](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2242?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc) | Coverage Δ | | |---|---|---| | [daft/dataframe/dataframe.py](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2242?src=pr&el=tree&filepath=daft%2Fdataframe%2Fdataframe.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc#diff-ZGFmdC9kYXRhZnJhbWUvZGF0YWZyYW1lLnB5) | `90.20% <100.00%> (ø)` | | | [daft/execution/execution\_step.py](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2242?src=pr&el=tree&filepath=daft%2Fexecution%2Fexecution_step.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc#diff-ZGFmdC9leGVjdXRpb24vZXhlY3V0aW9uX3N0ZXAucHk=) | `93.77% <100.00%> (ø)` | | | [daft/execution/rust\_physical\_plan\_shim.py](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2242?src=pr&el=tree&filepath=daft%2Fexecution%2Frust_physical_plan_shim.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc#diff-ZGFmdC9leGVjdXRpb24vcnVzdF9waHlzaWNhbF9wbGFuX3NoaW0ucHk=) | `96.25% <ø> (ø)` | | | [daft/logical/builder.py](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2242?src=pr&el=tree&filepath=daft%2Flogical%2Fbuilder.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc#diff-ZGFmdC9sb2dpY2FsL2J1aWxkZXIucHk=) | `91.04% <100.00%> (ø)` | | | [daft/table/micropartition.py](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2242?src=pr&el=tree&filepath=daft%2Ftable%2Fmicropartition.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc#diff-ZGFmdC90YWJsZS9taWNyb3BhcnRpdGlvbi5weQ==) | `90.70% <100.00%> (ø)` | | | [daft/table/table.py](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2242?src=pr&el=tree&filepath=daft%2Ftable%2Ftable.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc#diff-ZGFmdC90YWJsZS90YWJsZS5weQ==) | `56.86% <0.00%> (ø)` | | ... and [65 files with indirect coverage changes](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2242/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc)