feat: dataframe download separator#8318
Open
vavavavavavavavava wants to merge 3 commits intomarimo-team:mainfrom
Open
feat: dataframe download separator#8318vavavavavavavavava wants to merge 3 commits intomarimo-team:mainfrom
vavavavavavavavava wants to merge 3 commits intomarimo-team:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1 task
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
Add configurable CSV separator support to dataframe downloads, with consistent behavior across table backends.
Closes #7353
🔍 Description of Changes
This PR adds
download_csv_separatortomo.ui.dataframe(...)and threads it through the full CSV download path so user-provided separators are respected end-to-end.What changed
download_csv_separator: str | None = Nonedataframedownload handlerdownload_as(...)TableManager.to_csv(...)/to_csv_str(...)Backend behavior
DataFrame.to_csv(sep=...)write_csv(separator=...)(including fallback conversion path)write_csv()for default commacsv.writerfor non-comma separators to avoid backend-specific inconsistencyWhy
write_csv(separator=...)is not consistently reliable across all narwhals-backed dataframe combinations.This change makes non-comma CSV output predictable while preserving existing default behavior.
Backward compatibility
download_csv_separator.Example
Tests
Added/updated tests for:
dataframe_to_csv(..., separator=";")behavior across dataframe backends📋 Checklist
mo.ui.dataframe()download button #7353)