apache / apache/arrow

[Docs][Python] Document that `source` parameter to IPC readers can be a file path

Open
#46,927 2 comments 0 reactions 1 assignee Claimed by @skarhade22 View on GitHub
Component: Documentation Component: Python good-first-issue Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

The functions `pyarrow.ipc.open_file` and `pyarrow.ipc.open_stream` and the constructors `pyarrow.ipc.RecordBatchFileReader` and `pyarrow.ipc.RecordBatchStreamReader` can all take a file path for the `source` parameter, **but this is not documented**:

- https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.open_file.html
- https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.open_stream.html
- https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.RecordBatchFileReader.html
- https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.RecordBatchStreamReader.html

For comparison, notice that it **is documented** that the functions `pyarrow.ipc.new_file` and `pyarrow.ipc.new_stream` and the constructors `pyarrow.ipc.RecordBatchFileWriter` and `pyarrow.ipc.RecordBatchStreamWriter` can take a file path for the `sink` parameter:

- https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.new_file.html
- https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.new_stream.html
- https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.RecordBatchFileWriter.html
- https://arrow.apache.org/docs/dev/python/generated/pyarrow.ipc.RecordBatchStreamWriter.html

Adding this should be a simple addition in [`python/pyarrow/ipc.py`](https://github.com/apache/arrow/blob/main/python/pyarrow/ipc.py).

### Component(s)

Documentation, Python

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.