spenczar commented on code in PR #35865:
URL: https://github.com/apache/arrow/pull/35865#discussion_r1220051831


##########
python/pyarrow/array.pxi:
##########
@@ -2053,6 +2053,38 @@ cdef class ListArray(BaseListArray):
 
     @property
     def values(self):
+        """
+        Return the underlying array of values which backs the ListArray.
+
+        This is logically a concatenation of all the sub-lists in this array.
+
+        Note even null values are included. If any of the list slots
+        are null, but are backed by a non-empty sub-list, those values
+        will be included in the output.
+
+        Compare with ``flatten``, which returns only the non-null
+        values.
+
+        Returns
+        -------
+        values : Array
+
+        Examples
+        --------
+        >>> import pyarrow as pa
+        >>> array = pa.array([[1, 2], None, [3, 4, None, 6]])
+        >>> array.values
+        <pyarrow.lib.Int64Array object at ...>
+        [
+          1,
+          2,
+          3,
+          4,
+          null,
+          6
+        ]
+

Review Comment:
   This is a major improvement - thanks for the suggestion!



-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to