pyarrow.compute.indices_nonzero

pyarrow.compute.indices_nonzero(values, /, *, memory_pool=None)

Return the indices of the values in the array that are non-zero.

For each input value, check if it’s zero, false or null. Emit the index of the value in the array if it’s none of the those.

Parameters:
valuesArray-like

Argument to compute function.

memory_poolpyarrow.MemoryPool, optional

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