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), extracteither the FIRST, LAST or ALL items from a Map that havematching keys.

Parameters:
containerArray-like or scalar-like

Argument to compute function.

query_keyScalar orObjectcanbeconverted toScalar

The key to search for.

occurrencestr

The occurrence(s) to return from the MapAccepted 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.