pyarrow.compute.binary_replace_slice#

pyarrow.compute.binary_replace_slice(strings,/,start,stop,replacement,*,options=None,memory_pool=None)#

Replace a slice of a binary string.

For each string instrings, replace a slice of the string defined bystartandstop indices with the givenreplacement.start is inclusiveandstop is exclusive, and both are measured in bytes.Null values emit null.

Parameters:
stringsArray-like or scalar-like

Argument to compute function.

startint

Index to start slicing at (inclusive).

stopint

Index to stop slicing at (exclusive).

replacementstr

What to replace the slice with.

optionspyarrow.compute.ReplaceSliceOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

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