westonpace commented on a change in pull request #80:
URL: https://github.com/apache/arrow-cookbook/pull/80#discussion_r722484637



##########
File path: python/source/data.rst
##########
@@ -234,4 +234,57 @@ that match our predicate
     7,
     8,
     9
-  ]
\ No newline at end of file
+  ]
+
+Filtering Arrays for values matching a mask filter
+==================================================
+
+In many cases, when you are searching for something in an array
+you will end up with a mask that tells you the positions at which
+your search matched the values.
+
+For example in an array of four items, we might have a mask that
+matches the first and the last items only:
+
+.. testcode::
+
+  import pyarrow as pa
+
+  array = pa.array([1, 2, 3, 4])
+  mask = pa.array([True, False, False, True])
+
+We can then filter the array according to the mask using
+:meth:`pyarrow.Array.filter` to get back a new arrays with

Review comment:
       ```suggestion
   :meth:`pyarrow.Array.filter` to get back a new array with
   ```

##########
File path: python/source/data.rst
##########
@@ -234,4 +234,57 @@ that match our predicate
     7,
     8,
     9
-  ]
\ No newline at end of file
+  ]
+
+Filtering Arrays for values matching a mask filter
+==================================================

Review comment:
       ```suggestion
   Filtering Arrays using a mask
   =============================
   ```
   The old wording is ok too but "values matching a mask filter" can sound like 
the values in the array need to match the values in the mask.
   




-- 
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]


Reply via email to