I have an example CSV with 1 column in row 1 and 2 columns in the other rows. The parser in Polars read_csv only recognizes 1 column. How do I force it to read more columns? I cannot simply use skiprows because sometimes more than the first row is a single column. I know Pandas can get around this with the names parameter, but I need to use Polars for speed. Any help would be appreciated.
CSV contents:
Data
Date,A
Time,B
Code:
import polars as pl
dumpdf = pl.read_csv('example.csv', has_header=False)
print(dumpdf)
Perhaps there are better ways, but the idea of a pre-processing step was something like: