pyarrow.compute.utf8_slice_codeunits

pyarrow.compute.utf8_slice_codeunits(strings, /, start, stop=None, step=1, *, options=None, memory_pool=None)

Slice string.

For each string in strings, emit the substring defined by (start, stop, step) as given by SliceOptions where start is inclusive and stop is exclusive. All three values are measured in UTF8 codeunits. If step is negative, the string will be advanced in reversed order. An error is raised if step is zero. Null inputs emit null.

Parameters:
stringsArray-like or scalar-like

Argument to compute function.

startint

Index to start slicing at (inclusive).

stopint or None, default None

If given, index to stop slicing at (exclusive). If not given, slicing will stop at the end.

stepint, default 1

Slice step.

optionspyarrow.compute.SliceOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

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