pyarrow.compute.map_lookup¶
- pyarrow.compute.map_lookup(container, /, query_key, occurrence, *, options=None, memory_pool=None)¶
Find the items corresponding to a given key in a Map.
For a given query key (passed via MapLookupOptions), extract either the FIRST, LAST or ALL items from a Map that have matching keys.
- Parameters:
- containerArray-like or scalar-like
Argument to compute function.
- query_key
Scalar
orObject
can
be
converted
toScalar
The key to search for.
- occurrence
str
The occurrence(s) to return from the Map Accepted values are “first”, “last”, or “all”.
- options
pyarrow.compute.MapLookupOptions
, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool
, optional If not passed, will allocate memory from the default memory pool.