pandas.core.strings.StringMethods.pad

StringMethods.pad(width, side='left')

Pad strings with whitespace

Parameters :

arr : list or array-like

width : int

Minimum width of resulting string; additional characters will be filled with spaces

side : {‘left’, ‘right’, ‘both’}, default ‘left’

Returns :

padded : array