snowflake.snowpark.functions.left¶
- snowflake.snowpark.functions.left(str_expr: ColumnOrName, length: Column | int) Column [source]¶
Returns a left most substring of
str_expr
.Example:
>>> df = session.create_dataframe([["abc"], ["def"]], schema=["a"]) >>> df.select(left(col("a"), 2).alias("result")).show() ------------ |"RESULT" | ------------ |ab | |de | ------------