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
{{ message }}
Repository navigation
[Python] Expose RecordBatchFileReader::CountRows in Python #49305
In PyArrow, pyarrow.ipc.RecordBatchFileReader the only way I found to gather the total number of rows of contained in a Feather file is to do something along the lines of:
This is not very efficient when it seems you can directly count the rows using the metadata (as in RecordBatchFileReader::CountRows) (if I understand the code correctly?)
The current way of doing is intractable when reading from remote file systems.
Proposed solution
Expose RecordBatchFileReader::CountRows in Python.
Thank you for opening the issue @adrien-grl !
From a quick look of the code I would agree. This would be nice to have in PyArrow and looks like a straightforward binding to add with all the info in the above description already figuring out important steps.
Activity
AlenkaF commentedon Mar 27, 2026
Thank you for opening the issue @adrien-grl !
From a quick look of the code I would agree. This would be nice to have in PyArrow and looks like a straightforward binding to add with all the info in the above description already figuring out important steps.
Would you be interested in submitting a PR?
GujaLomsadze commentedon Jul 26, 2026
Hi @AlenkaF, @adrien-grl.
Seems like this issue has been stale for quite a bit. I would love to take this.
apacheGH-49305: [Python] Drop redundant closed-reader check in count_…
pitrou commentedon Jul 30, 2026
Issue resolved by pull request 50646
#50646
apacheGH-49305: [Python] Expose RecordBatchFileReader.count_rows (apa…