Skip to content
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

fail to convert CSV table #1144

Open
ramondsq opened this issue Mar 20, 2025 · 4 comments · May be fixed by #1171
Open

fail to convert CSV table #1144

ramondsq opened this issue Mar 20, 2025 · 4 comments · May be fixed by #1171
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ramondsq
Copy link

i tried to convert a csv format table to markdown. but it end up just copied the content from the csv file and rename it to .md. it is weird that even Excels are able to be converted correctly.
command that i use: markitdown adni1.csv > adni.md

adni1.csv

"Image Data ID","Subject","Group","Sex","Age","Visit","Modality","Description","Type","Acq Date","Format","Downloaded"
"I99265","136_S_1227","MCI","F","66","m12","MRI","MPR; ; N3; Scaled","Processed","3/06/2008","NiFTI","1/06/2024"

adni.md

"Image Data ID","Subject","Group","Sex","Age","Visit","Modality","Description","Type","Acq Date","Format","Downloaded"
"I99265","136_S_1227","MCI","F","66","m12","MRI","MPR; ; N3; Scaled","Processed","3/06/2008","NiFTI","1/06/2024"
@afourney
Copy link
Member

Ahhh, CSV files might be detected as plain text and just be printed. Let me look into that.

@afourney afourney added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 23, 2025
@Remohavva
Copy link

The issue is that markitdown doesn't seem to be an actual command for converting CSV to Markdown.
Try Using csv2md
You can use a proper CSV-to-Markdown converter like csv2md. Install it
npm install -g csv2md
And then
csv2md < adni1.csv > adni.md

@Remohavva
Copy link

i tried to convert a csv format table to markdown. but it end up just copied the content from the csv file and rename it to .md. it is weird that even Excels are able to be converted correctly.
command that i use: markitdown adni1.csv > adni.md

adni1.csv

"Image Data ID","Subject","Group","Sex","Age","Visit","Modality","Description","Type","Acq Date","Format","Downloaded"
"I99265","136_S_1227","MCI","F","66","m12","MRI","MPR; ; N3; Scaled","Processed","3/06/2008","NiFTI","1/06/2024"

adni.md

"Image Data ID","Subject","Group","Sex","Age","Visit","Modality","Description","Type","Acq Date","Format","Downloaded"
"I99265","136_S_1227","MCI","F","66","m12","MRI","MPR; ; N3; Scaled","Processed","3/06/2008","NiFTI","1/06/2024"

Try using csv2md converter or make the tables manually

@ramondsq
Copy link
Author

The issue is that markitdown doesn't seem to be an actual command for converting CSV to Markdown. Try Using csv2md You can use a proper CSV-to-Markdown converter like csv2md. Install it npm install -g csv2md And then csv2md < adni1.csv > adni.md

thanks for your help. that's a way to solve the problem. but im just wondering integrating the csv convertion into this tool would be great.

@benny123tw benny123tw linked a pull request Apr 8, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants