You are viewing documentation about an older version (1.3.0). View latest version

snowflake.snowpark.functions.rtrim

snowflake.snowpark.functions.rtrim(e: ColumnOrName, trim_string: ColumnOrName | None = None) Column[source]

Removes trailing characters, including whitespace, from a string.

Example:

>>> from snowflake.snowpark.functions import lit
>>> df = session.create_dataframe([["asss"], ["bsss"], ["csss"]], schema=["a"])
>>> df.select(rtrim(col("a"), trim_string=lit("sss")).alias("result")).show()
------------
|"RESULT"  |
------------
|a         |
|b         |
|c         |
------------
Copy