After downloading a CSV from the web, I want to load it into a DataFrame.
Loading the CSV directly from memory using DataFrame.load_csv!/2 results in a RuntimeError.
Storing the CSV binary in a temporary file, and then loading it using DataFrame.from_csv!/2 works fine.
My assumption was that load_csv! and from_csv! should behave somewhat identical (except touching disk)
Below code with load_csv!/2 gives me
%RuntimeError{
message: "load_csv failed:
%RuntimeError{
message: "Polars Error: found more fields than defined in 'Schema'
Consider setting 'truncate_ragged_lines=true'.
After downloading a CSV from the web, I want to load it into a DataFrame.
DataFrame.load_csv!/2
results in a RuntimeError.DataFrame.from_csv!/2
works fine.My assumption was that
load_csv!
andfrom_csv!
should behave somewhat identical (except touching disk)Below code with
load_csv!/2
gives meHere's a quick repro for LiveBook:
Maybe that's not a bug but a user error on my side. Is there a better place to ask that question?