snowflake.snowpark.functions.ltrim¶

snowflake.snowpark.functions.ltrim(e: Union[Column, str], trim_string: Optional[Union[Column, str]] = None) → Column[source]¶

Removes leading 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