Filter with a boolean selection filter.
The output is populated with values from the input at positions where the selection filter is non-zero. Nulls in the selection filter are handled based on FilterOptions.
Argument to compute function.
Argument to compute function.
str
, default âdropâ
How to handle nulls in the selection filter. Accepted values are âdropâ, âemit_nullâ.
pyarrow.compute.FilterOptions
, optional
Alternative way of passing options.
pyarrow.MemoryPool
, optional
If not passed, will allocate memory from the default memory pool.
Examples
>>> import pyarrow as pa >>> arr = pa.array(["a", "b", "c", None, "e"]) >>> mask = pa.array([True, False, None, False, True]) >>> arr.filter(mask) <pyarrow.lib.StringArray object at ...> [ "a", "e" ] >>> arr.filter(mask, null_selection_behavior='emit_null') <pyarrow.lib.StringArray object at ...> [ "a", null, "e" ]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4