You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing skip_rows into scan_csv and read_csv with glob patterns doesn't skip rows before header in first file and doesn't skip rows at all in subsequent files
#6692
Closed
2 tasks done
qiemem opened this issue
Feb 5, 2023
· 1 comment
· Fixed by #6754
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Issue description
Passing skip_rows into scan_csv/read_csv with glob patterns results in the first line still being used as the header instead of skipping rows the specified number before the header. Also, rows are not skipped at all in any files but the first (whereas the main application of skip_rows is to skip metadata headers that are presumably the same across all files).
For anyone else that runs into this, a workaround is to just do with this manually with the built-in glob library:
Polars version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Issue description
Passing
skip_rows
intoscan_csv
/read_csv
with glob patterns results in the first line still being used as the header instead of skipping rows the specified number before the header. Also, rows are not skipped at all in any files but the first (whereas the main application ofskip_rows
is to skip metadata headers that are presumably the same across all files).For anyone else that runs into this, a workaround is to just do with this manually with the built-in
glob
library:Reproducible example
Input:
Output:
With glob
Single file without glob
Expected behavior
With glob
Single file without glob
Installed versions
The text was updated successfully, but these errors were encountered: