pyarrow.compute.ascii_lpad

pyarrow.compute.ascii_lpad(strings, /, width, padding=' ', *, options=None, memory_pool=None)

Right-align strings by padding with a given character.

For each string in strings, emit a right-aligned string by prepending the given ASCII character. Null values emit null.

Parameters:
stringsArray-like or scalar-like

Argument to compute function.

widthint

Desired string length.

paddingstr, default “ “

What to pad the string with. Should be one byte or codepoint.

optionspyarrow.compute.PadOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

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