Pad right side of strings in the Series/Index.
Equivalent to str.ljust()
.
Minimum width of resulting string; additional characters will be filled with fillchar
.
Additional character for filling, default is whitespace.
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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4