jorisvandenbossche commented on a change in pull request #12627:
URL: https://github.com/apache/arrow/pull/12627#discussion_r831844988
##########
File path: docs/source/python/data.rst
##########
@@ -518,17 +518,15 @@ Record Batch Readers
Many functions in PyArrow either return or take as an argument a
:class:`RecordBatchReader`.
It can be used like any iterable of record batches, but also provides their
common
-schema without having to get any of the batches.
-
-.. ipython:: python
-
- schema = pa.schema([('x', pa.int64())])
- def iter_record_batches():
- for i in range(2):
- yield pa.RecordBatch.from_arrays([pa.array([1, 2, 3])], schema=schema)
- reader = pa.RecordBatchReader.from_batches(schema, iter_record_batches())
- print(reader.schema)
- for batch in reader:
- print(batch)
+schema without having to get any of the batches.::
+
+ >>> schema = pa.schema([('x', pa.int64())])
+ >>> def iter_record_batches():
+ ... for i in range(2):
+ ... yield pa.RecordBatch.from_arrays([pa.array([1, 2, 3])],
schema=schema)
+ >>> reader = pa.RecordBatchReader.from_batches(schema,
iter_record_batches())
+ >>> print(reader.schema)
Review comment:
You can add the output here of the print statement (so users see what
the code does, the same as in the docstrings)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]