fix(tables): preserve columns in DefaultTableManager exports#9258
Merged
kirangadhave merged 1 commit intomainfrom Apr 20, 2026
Merged
fix(tables): preserve columns in DefaultTableManager exports#9258kirangadhave merged 1 commit intomainfrom
kirangadhave merged 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
mscolnick
approved these changes
Apr 18, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves DefaultTableManager export/selection behavior so heterogeneous row-oriented data and mismatched-length column-oriented data preserve all columns/rows consistently (instead of silently omitting them).
Changes:
- Infer row-oriented column names by unioning keys across the first
1000rows (first-seen order). - Normalize column-oriented dict-of-lists using
zip_longest(..., fillvalue=None)and compute row count as the longest column. - Make row-oriented
select_columns()resilient to missing keys by usingrow.get(...)(fills withNone).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
marimo/_plugins/ui/_impl/tables/default_table.py |
Updates column inference, normalization, selection behavior, and row counting to preserve columns/rows in exports. |
tests/_plugins/ui/_impl/tables/test_default_table.py |
Adds coverage for heterogeneous row keys and mismatched column lengths in CSV/JSON and helpers. |
…n lengths in DefaultTableManager exports
bdcc795 to
356823d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Closes https://github.com/marimo-team/qa-agent/issues/12
get_column_names()now unions keys across first1000rows. previously we checked only first row_normalize_data()pads short columns withNonewithzip_longest. Prevents row omission in column-oriented dataselect_columns()on row-oriented data usesrow.get(key)instead ofrow[key]. Missing keys becomeNonerather than raisingKeyError.get_num_rows()for column-oriented data returns the longest column length, matching normalized output.