You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/07 07:43:07 UTC

[GitHub] [arrow] AlenkaF commented on a diff in pull request #12762: ARROW-16057: [Python] Address docstrings for RecordBatch class, methods, attributes and constructor

AlenkaF commented on code in PR #12762:
URL: https://github.com/apache/arrow/pull/12762#discussion_r844819997


##########
python/pyarrow/array.pxi:
##########
@@ -750,6 +750,28 @@ cdef class _PandasConvertible(_Weakrefable):
         Returns
         -------
         pandas.Series or pandas.DataFrame depending on type of object
+
+        Examples
+        --------
+        Convert a RecordBatch to pandas DataFrame:
+
+        >>> import pyarrow as pa
+        >>> n_legs = pa.array([2, 4, 5, 100])
+        >>> animals = pa.array(["Flamingo", "Horse", "Brittle stars", "Centipede"])
+        >>> batch = pa.RecordBatch.from_arrays([n_legs, animals],
+        ...                                     names=["n_legs", "animals"])

Review Comment:
   Yes, good point! Corrected.
   Thanks for the reviews!



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org