We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read_csv
skip_rows_after_header
use_pyarrow=True
import polars as pl from pathlib import Path file = Path('./test.csv') with file.open('w') as f: f.write( """foo,bar 1,2 3,4 5,6 """ ) print('use_pyarrow=True') print(pl.read_csv("test.csv", skip_rows_after_header=1, use_pyarrow=True)) print('use_pyarrow=False') print(pl.read_csv("test.csv", skip_rows_after_header=1, use_pyarrow=False)) file.unlink()
No response
Commands above output:
use_pyarrow=True shape: (3, 2) ┌─────┬─────┐ │ foo ┆ bar │ │ --- ┆ --- │ │ i64 ┆ i64 │ ╞═════╪═════╡ │ 1 ┆ 2 │ │ 3 ┆ 4 │ │ 5 ┆ 6 │ └─────┴─────┘ use_pyarrow=False shape: (2, 2) ┌─────┬─────┐ │ foo ┆ bar │ │ --- ┆ --- │ │ i64 ┆ i64 │ ╞═════╪═════╡ │ 3 ┆ 4 │ │ 5 ┆ 6 │ └─────┴─────┘
Regardless of what use_pyarrow is set to outputs should match
use_pyarrow
--------Version info--------- Polars: 0.20.18 Index type: UInt32 Platform: Windows-10-10.0.19045-SP0 Python: 3.12.2 (tags/v3.12.2:6abddd9, Feb 6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)] ----Optional dependencies---- adbc_driver_manager: <not installed> cloudpickle: 3.0.0 connectorx: <not installed> deltalake: <not installed> fastexcel: 0.10.3 fsspec: 2024.3.1 gevent: <not installed> hvplot: <not installed> matplotlib: <not installed> nest_asyncio: 1.6.0 numpy: 1.26.4 openpyxl: 3.1.2 pandas: <not installed> pyarrow: 15.0.2 pydantic: 2.6.4 pyiceberg: <not installed> pyxlsb: <not installed> sqlalchemy: <not installed> xlsx2csv: <not installed> xlsxwriter: <not installed>
The text was updated successfully, but these errors were encountered:
It looks like pyarrow calls this skip_rows_after_names which would need to be added:
polars/py-polars/polars/io/csv/functions.py
Lines 269 to 273 in 31df06d
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Checks
Reproducible example
Log output
No response
Issue description
Commands above output:
Expected behavior
Regardless of what
use_pyarrow
is set to outputs should matchInstalled versions
The text was updated successfully, but these errors were encountered: