Python Polars: How to skip empty line in the CSV file using pl.scan()?
df=pl.scan_csv('c:/test.tab', separator='\t', skip_rows=2)print(df)c:/test.tab(delimiter is tab space)
row1 : V5 test filerow2 : row3 : Date filename countrow4 : 16-FEB-23 test123.csv 120row5 : 17-FEB-23 sample111.csv 100row6 : 18-FEB-23 abcd12.csv 12Issue:
- It was skipping the row4 and produce row5 & row6 only when we use
skip_rows=2. - However tried to use
skip_rows=1then It does not recognize the columns at row3 because it checking at row2 as header.