pandas.Series.str.rjust
pandas 3.1.1 · Series and accessors · method
Pad the left-hand side of strings so the text is right-aligned.
Call syntax
Series.str.rjust(width, fillchar=' ')Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
width |
Required Positional or keyword |
int Set the requested width of the formatted result. |
fillchar |
Optional Positional or keyword Default ' ' |
str Choose the character used to pad strings. |
Returns
Series/Index of objects.