Open mihai-afternet opened 1 day ago
This was caused by #19124. @ritchie46 can you have a look.
It's actually a correct error. The value is incorrectly escaped. It should be """test test"" test"
, enclosing the entire field in "
and doubling (escaping) internal "
.
Previously we read it incorrectly, so this was a bug fix.
Is there a workaround? I imagine many people don't have control over the underlying data so this makes it impossible to read certain datasets with polars.
Yes, Set a different quoting value if the data isn't quoted properly. The error gives a few tips.
Reading it in if the quote char is set to "
, isn't an option. It's invalid csv.
Checks
Reproducible example
Fails:
Works:
Or:
Log output
Issue description
I encountered a ComputeError when attempting to parse a string in a CSV column using Polars version 1.10.0. The string in question is "test test" test, which should be parsed as a valid string. This issue did not occur in previous versions of Polars, making it a regression introduced in 1.10.0.
I can use the quote_char=None parameter to overcome the issue.
Expected behavior
The string <"test test" test> should be successfully parsed as a valid string in the 'Name' column without raising an error
Installed versions