dask.dataframe.Series.str.ljust
dask.dataframe.Series.str.ljust¶
- dataframe.Series.str.ljust(width: int, fillchar: str = ' ')¶
Pad right side of strings in the Series/Index.
This docstring was copied from pandas.core.strings.accessor.StringMethods.ljust.
Some inconsistencies with the Dask version may exist.
Equivalent to
str.ljust()
.- Parameters
- widthint
Minimum width of resulting string; additional characters will be filled with
fillchar
.- fillcharstr
Additional character for filling, default is whitespace.
- Returns
- Series/Index of objects.
Examples
For Series.str.center:
>>> ser = pd.Series(['dog', 'bird', 'mouse']) >>> ser.str.center(8, fillchar='.') 0 ..dog... 1 ..bird.. 2 .mouse.. dtype: object
For Series.str.ljust:
>>> ser = pd.Series(['dog', 'bird', 'mouse']) >>> ser.str.ljust(8, fillchar='.') 0 dog..... 1 bird.... 2 mouse... dtype: object
For Series.str.rjust:
>>> ser = pd.Series(['dog', 'bird', 'mouse']) >>> ser.str.rjust(8, fillchar='.') 0 .....dog 1 ....bird 2 ...mouse dtype: object