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

reading in dirty csv's with extra quote's should give a warning #1539

Open
jvelumc opened this issue Apr 17, 2024 · 0 comments
Open

reading in dirty csv's with extra quote's should give a warning #1539

jvelumc opened this issue Apr 17, 2024 · 0 comments

Comments

@jvelumc
Copy link

jvelumc commented Apr 17, 2024

I was using readr to open a CSV file which had a cell that ended with a quote. readr::read_delim did not recognize it being dirty, and does not give a warning. It did not return the full dataframe, only the rows before the line with the extra quote.

Example of CSV where read_delim will only return the first row (and also the header), without giving warnings that something may be off:

"a"	"b"	"c"
"1"	"test 1"	"A"
"2"	"test 2, this cell ends with an extra quote""	"B"
"3"	"test 3"	"C"
"4"	"test 4"	"D"

Download csv here:
dirty_csv.csv

utils:read.delim() does give a warning
data.table::fread() also gives a warning, tries to fix the cell and returned the complete data set

readr should give a warning at the very least.

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

No branches or pull requests

1 participant