pyarrow.compute.binary_replace_slice

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

Replace a slice of a binary string with replacement.

For each string in strings, replace a slice of the string defined by start`and `stop with replacement. start is inclusive and stop is exclusive, and both are measured in bytes. Null values emit null.

Parameters
  • strings (Array-like or scalar-like) – Argument to compute function

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

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

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

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

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