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

CSV file sometimes displaying incorrectly #9970

Open
rempsyc opened this issue Jul 6, 2022 · 1 comment
Open

CSV file sometimes displaying incorrectly #9970

rempsyc opened this issue Jul 6, 2022 · 1 comment
Labels

Comments

@rempsyc
Copy link

rempsyc commented Jul 6, 2022

I have generated a csv data file in R, and the file displays correctly in R or Excel, but not on OSF: (original link: https://osf.io/zh9rv)

bad data display

This issue is not new, but before, although nothing wrong appears in the csv file itself, I was able to edit the file directly on OSF to fix the incorrect display. The fix was (oddly) to remove the space between (in this case) the second column and the first (and adding a comma). However, it seems OSF has removed the ability to modify CSV files, so this workaround is no longer possible. I was able to fix it manually but I would still like to report this bug so it can be investigated [edit: not fixed after all, I just messed the file up earlier].

The example data file can be retrieved in the testing repository below. I've attempted to simplify the data frame to have a minimally reproducible example, but I am not able to identify the origin of the bug precisely. Removing some columns removes the bug, and readding them reintroduces the bug, but I don't see any clear pattern in the affected columns. Perhaps this is related to empty rows.

https://osf.io/v8b64

test

Edit: Here another example from a different research team: https://osf.io/4zp9b

@cslzchen
Copy link
Contributor

cslzchen commented Aug 2, 2022

Thanks for reaching out. This is a known bug that Python CSV sniffing doesn't work as expect when there are too many columns. I created a PR two years ago: CenterForOpenScience/modular-file-renderer#362 but sadly it was lost. Your issue has brought this back up to the team and hopefully we will have this one fixed soon. Cc @felliott for transparency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants