polars
polars copied to clipboard
fix: Allow parsing csv file which doesn't has a header and has rows with variable number of columns
Issue: https://github.com/pola-rs/polars/issues/1505
Description : When we pass a csv file without a header and has rows with variable length columns , the parser assumes to create a header based on first row of the csv file . But this can cause issue because other rows can have more columns than the first one and it can lead to error.
Fix : While creating headers consider the row with maximum columns and create headers accordingly
Test: 1.There is a new test added to io::cvs::test_read_csv_file_without_headers_and_non_uniform_col_len 2. checkout the new csv headerless.csv in examples/datasets/headerless for this test
can u guys review this when free! ty