pyarrow.compute.scatter#

pyarrow.compute.scatter(values,indices,/,max_index=-1,*,options=None,memory_pool=None)#

Scatter the values into specified positions according to the indices.

Place thei-th value at the position specified by thei-th index

Parameters:
valuesArray-like or scalar-like

Argument to compute function.

indicesArray-like or scalar-like

Argument to compute function.

max_indexint64, default -1

The max value in the input indices to allow.The length of the function’s output will be this value plus 1.If negative, this value will be set to the length of the input indices minus 1and the length of the function’s output will be the length of the input indices.

optionspyarrow.compute.ScatterOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

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