-
Notifications
You must be signed in to change notification settings - Fork 5k
When converting CSV to Markdown, change to use pandas, as with XLSX and XLS. #1538
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@komoroko please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
Problem
When a CSV file contains line breaks inside a cell, the generated Markdown table becomes corrupted after conversion.
This type of CSV file is reasonably common in real-world and enterprise datasets, and supporting this case improves the robustness of the conversion process.
Example CSV
In this case, the line break inside the quoted cell causes the Markdown table structure to break.
Solution
To address this issue, the CSV-to-Markdown conversion was updated to use pandas-based HTML conversion, consistent with the existing handling for xlsx and xls files.
By adopting pandas-based HTML conversion for CSV-to-Markdown processing, multiline cells are handled correctly and the table structure is preserved.
Result