GitHub user pitrou added a comment to the discussion: pyarrow: open_csv with an 
empty file

It should work fine if your file has an end-of-line character:
```python
>>> from pyarrow import csv
>>> with open("xx.csv", "rb") as f: print(f.read())
b'id,ra,dec,ra_error,dec_error,comment,code\n'
>>> csv.read_csv("xx.csv")
pyarrow.Table
id: null
ra: null
dec: null
ra_error: null
dec_error: null
comment: null
code: null
----
id: [0 nulls]
ra: [0 nulls]
dec: [0 nulls]
ra_error: [0 nulls]
dec_error: [0 nulls]
comment: [0 nulls]
code: [0 nulls]
>>> list(csv.open_csv("xx.csv"))
[]
```

GitHub link: 
https://github.com/apache/arrow/discussions/46429#discussioncomment-13429293

----
This is an automatically sent email for user@arrow.apache.org.
To unsubscribe, please send an email to: user-unsubscr...@arrow.apache.org

Reply via email to