pyarrow.compute.array_take#

pyarrow.compute.array_take(array,indices,/,*,boundscheck=True,options=None,memory_pool=None)#

Select values from an array based on indices from another array.

The output is populated with values from the input array at positionsgiven byindices. Nulls inindices emit null in the output.

Parameters:
arrayArray-like

Argument to compute function.

indicesArray-like

Argument to compute function.

boundscheckbool, defaultTrue

Whether to check indices are within bounds. If False and anindex is out of bounds, behavior is undefined (the processmay crash).

optionspyarrow.compute.TakeOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

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