amol- commented on a change in pull request #66:
URL: https://github.com/apache/arrow-cookbook/pull/66#discussion_r707189675
##########
File path: python/source/create.rst
##########
@@ -67,6 +67,58 @@ from a variety of inputs, including plain python objects
:func:`pyarrow.array` for conversion to Arrow arrays,
and will benefit from zero copy behaviour when possible.
+Creating RecordBatches
+======================
+
+Most IO operations in Arrow happen shipping batches of data
+to the destination, :class:`pyarrow.RecordBatch` are the way
+Arrow represents batches of data, they can be seen as a slice
+of a table.
+
+.. testcode::
+
+ import pyarrow as pa
+
+ batch = pa.RecordBatch.from_arrays([
+ pa.array([1, 2, 3, 4, 5]),
+ pa.array([10, 20, 30, 40, 50])
+ ], names=["first", "second"])
Review comment:
Refactored the example to use odd and even numbers, should be
immediately clear to the reader of things map
--
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]