pyarrow.compute.utf8_center#
- pyarrow.compute.utf8_center(strings, /, width, padding=' ', lean_left_on_odd_padding=True, *, options=None, memory_pool=None)#
Center strings by padding with a given character.
For each string in strings, emit a centered string by padding both sides with the given UTF8 codeunit. Null values emit null.
- Parameters:
- stringsArray-like or scalar-like
Argument to compute function.
- width
int
Desired string length.
- padding
str
, default “ “ What to pad the string with. Should be one byte or codepoint.
- lean_left_on_odd_paddingbool, default
True
What to do if there is an odd number of padding characters (in case of centered padding). Defaults to aligning on the left (i.e. adding the extra padding character on the right).
- options
pyarrow.compute.PadOptions
, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool
, optional If not passed, will allocate memory from the default memory pool.