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_keyScalar or Object can be converted to Scalar

The key to search for.

occurrencestr

The occurrence(s) to return from the Map Accepted values are “first”, “last”, or “all”.

optionspyarrow.compute.MapLookupOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

If not passed, will allocate memory from the default memory pool.