daft.Expression.str.rpad#
- Expression.str.rpad(length: int | daft.expressions.expressions.Expression, pad: str | daft.expressions.expressions.Expression) Expression [source]#
Right-pads each string by truncating or padding with the character
Note
If the string is longer than the specified length, it will be truncated. The pad character must be a single character.
Example
>>> col("x").str.rpad(5, "0")
- Returns:
a String expression which is
self
truncated or right-padded with the pad character- Return type:
Expression