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 the i-th value at the position specified by the i-th index
- Parameters:
- valuesArray-like or scalar-like
Argument to compute function.
- indicesArray-like or scalar-like
Argument to compute function.
- max_index
int64, 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 1 and the length of the function’s output will be the length of the input indices.
- options
pyarrow.compute.ScatterOptions, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool, optional If not passed, will allocate memory from the default memory pool.