pyarrow.compute.array_filter#
- pyarrow.compute.array_filter(array, selection_filter, /, null_selection_behavior='drop', *, options=None, memory_pool=None)#
Filter with a boolean selection filter.
The output is populated with values from the input array at positions where the selection filter is non-zero. Nulls in the selection filter are handled based on FilterOptions.
- Parameters:
- arrayArray-like
Argument to compute function.
- selection_filterArray-like
Argument to compute function.
- null_selection_behavior
str
, default “drop” How to handle nulls in the selection filter. Accepted values are “drop”, “emit_null”.
- options
pyarrow.compute.FilterOptions
, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool
, optional If not passed, will allocate memory from the default memory pool.