@@ -742,6 +742,7 @@ def read_csv_batched(
742
742
comment_prefix : str | None = None ,
743
743
quote_char : str | None = '"' ,
744
744
skip_rows : int = 0 ,
745
+ skip_lines : int = 0 ,
745
746
schema_overrides : (
746
747
Mapping [str , PolarsDataType ] | Sequence [PolarsDataType ] | None
747
748
) = None ,
@@ -806,7 +807,13 @@ def read_csv_batched(
806
807
Single byte character used for csv quoting, default = `"`.
807
808
Set to None to turn off special handling and escaping of quotes.
808
809
skip_rows
809
- Start reading after `skip_rows` lines.
810
+ Start reading after ``skip_rows`` rows. The header will be parsed at this
811
+ offset. Note that we respect CSV escaping/comments when skipping rows.
812
+ If you want to skip by newline char only, use `skip_lines`.
813
+ skip_lines
814
+ Start reading after `skip_lines` lines. The header will be parsed at this
815
+ offset. Note that CSV escaping will not be respected when skipping lines.
816
+ If you want to skip valid CSV rows, use ``skip_rows``.
810
817
schema_overrides
811
818
Overwrite dtypes during inference.
812
819
null_values
@@ -1019,6 +1026,7 @@ def read_csv_batched(
1019
1026
comment_prefix = comment_prefix ,
1020
1027
quote_char = quote_char ,
1021
1028
skip_rows = skip_rows ,
1029
+ skip_lines = skip_lines ,
1022
1030
schema_overrides = schema_overrides ,
1023
1031
null_values = null_values ,
1024
1032
missing_utf8_is_empty_string = missing_utf8_is_empty_string ,
0 commit comments