polars
polars copied to clipboard
JSON Error should also report line
Description
Ciao! I was trying to read_json a file and got this error:
The issue is due to malformed JSON.
pandas has an uninformative error as well:
The better error message is that of python's native reader:
Pandas doesn't run in parallel. So it can (easily) keep a line counter. This error could be in a chunk later in the file when we don't know how large the previous chunks will be.
Definitely not trivial, you are right. The "char" indicator denotes the character position in the line then, rather than the position in the whole file?