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

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

The output is populated with values from the input array at positions given by indices. Nulls in indices emit null in the output.

  • array (Array-like) – Argument to compute function

  • indices (Array-like) – Argument to compute function

  • memory_pool (pyarrow.MemoryPool, optional) – If not passed, will allocate memory from the default memory pool.

  • options (pyarrow.compute.TakeOptions, optional) – Parameters altering compute function semantics.

  • boundscheck (optional) – Parameter for TakeOptions constructor. Either options or boundscheck can be passed, but not both at the same time.