snowflake.snowpark.functions.rtrim

snowflake.snowpark.functions.rtrim(e: Union[Column, str], trim_string: Optional[Union[Column, str]] = None) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L2238-L2257)

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
语言: 中文