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
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Reproducible example
importosimportpandasaspdimportpolarsasplr_fd, w_fd=os.pipe()
r_file=os.fdopen(r_fd, 'rb', buffering=0)
w_file=os.fdopen(w_fd, 'wb', buffering=0)
df=pl.DataFrame({'Hello': 'World'})
withw_fileasf:
df.write_csv(w_file)
withr_fileasf:
df=pl.read_csv(f)
#df = pd.read_csv(f) # works fine in pandasprint(df)
Log output
Traceback (most recent call last):
File "/Users/klst/Library/Application Support/JetBrains/PyCharmCE2024.1/scratches/scratch_1.py", line 16, in<module>
df = pl.read_csv(f)
^^^^^^^^^^^^^^
File "/Users/klst/Library/Caches/pypoetry/virtualenvs/pyexasol-cQLUeQM1-py3.12/lib/python3.12/site-packages/polars/_utils/deprecation.py", line 91, in wrapper
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/klst/Library/Caches/pypoetry/virtualenvs/pyexasol-cQLUeQM1-py3.12/lib/python3.12/site-packages/polars/_utils/deprecation.py", line 91, in wrapper
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/klst/Library/Caches/pypoetry/virtualenvs/pyexasol-cQLUeQM1-py3.12/lib/python3.12/site-packages/polars/_utils/deprecation.py", line 91, in wrapper
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/klst/Library/Caches/pypoetry/virtualenvs/pyexasol-cQLUeQM1-py3.12/lib/python3.12/site-packages/polars/io/csv/functions.py", line 418, in read_csv
df = _read_csv_impl(
^^^^^^^^^^^^^^^
File "/Users/klst/Library/Caches/pypoetry/virtualenvs/pyexasol-cQLUeQM1-py3.12/lib/python3.12/site-packages/polars/io/csv/functions.py", line 564, in _read_csv_impl
pydf = PyDataFrame.read_csv(
^^^^^^^^^^^^^^^^^^^^^
OSError: Invalid argument (os error 22)
Issue description
Unlike pandas, Polars does currently not support pipes in read_csv.
This makes integration with libraries that use pipes as a base for exchanging data (e.g. pyexasol, the Exasol database driver library) impossible.
In other words, fixing this bug would help increasing adoption of polars
Checks
Reproducible example
Log output
Issue description
Unlike pandas, Polars does currently not support pipes in read_csv.
This makes integration with libraries that use pipes as a base for exchanging data (e.g. pyexasol, the Exasol database driver library) impossible.
In other words, fixing this bug would help increasing adoption of polars
Expected behavior
Polars should also support pipes.
Installed versions
The text was updated successfully, but these errors were encountered: