Skip to content

Commit ea749af

Browse files
Feat add pivot transform to mo.UI.dataframe #7345 (#7584)
## 📝 Summary <!-- Provide a concise summary of what this pull request is addressing. If this PR fixes any issues, list them here by number (e.g., Fixes #123). --> Fixes #7345 ## 🔍 Description of Changes <!-- Detail the specific changes made in this pull request. Explain the problem addressed and how it was resolved. If applicable, provide before and after comparisons, screenshots, or any relevant details to help reviewers understand the changes easily. --> ### Backend - Created handler and types for `PivotTransform` in `marimo/_plugins/ui/_impl/dataframes/transforms` - Ibis backend doesn't support pivot. The handler implementation is using group_by. ### Frontend - Added icon to mo.ui.dataframe transform panel. - Added `PivotTransformSchema` with `column_ids, index_column_ids, value_column_ids, aggregation` parameters in `frontend/src/plugins/impl/data-frames/schema.ts`. - ~~Added effect to collect unique column values so new column names can be generated on the frontend. `frontend/src/plugins/impl/data-frames/panel.ts`~~ ## 📋 Checklist - [x] I have read the [contributor guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md). - [x] For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on [Discord](https://marimo.io/discord?ref=pr), or the community [discussions](https://github.com/marimo-team/marimo/discussions) (Please provide a link if applicable). - [x] I have added tests for the changes made. - [x] I have run the code and verified that it works as expected. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c9302e5 commit ea749af

File tree

11 files changed

+971
-25
lines changed

11 files changed

+971
-25
lines changed

docs/api/inputs/dataframe.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Supported transforms are:
2020
- Shuffle Rows
2121
- Explode Columns
2222
- Expand Dict
23+
- Unique
24+
- Pivot
2325

2426
!!! info "Request a Transform"
2527

0 commit comments

Comments
 (0)