snowflake.snowpark.functions.rpad¶
- snowflake.snowpark.functions.rpad(e: Union[Column, str], len: Union[Column, int], pad: Union[Column, str]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/functions.py#L2578-L2604)¶
Right-pads a string with characters from another string, or right-pads a binary value with bytes from another binary value. When called, e is padded to length len with characters/bytes from pad.
Example:
>>> from snowflake.snowpark.functions import lit >>> df = session.create_dataframe([["a"], ["b"], ["c"]], schema=["a"]) >>> df.select(rpad(col("a"), 3, lit("k")).alias("result")).show() ------------ |"RESULT" | ------------ |akk | |bkk | |ckk | ------------