Skip to content

Commit 9237400

Browse files
committed
Fix PyArrow RecordBatchReader import to use _import_from_c_capsule for improved memory handling
1 parent 02e39f8 commit 9237400

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/source/user-guide/dataframe/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ out-of-memory errors.
164164
import pyarrow as pa
165165
166166
# Create a PyArrow RecordBatchReader without materializing all batches
167-
reader = pa.RecordBatchReader._import_from_c(df.__arrow_c_stream__())
167+
reader = pa.RecordBatchReader._import_from_c_capsule(df.__arrow_c_stream__())
168168
for batch in reader:
169169
... # process each batch as it is produced
170170

0 commit comments

Comments
 (0)