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

snowflake.snowpark.functions.startswith¶

snowflake.snowpark.functions.startswith(col: ColumnOrName, str: ColumnOrName) → Column[source]¶

Returns true if col starts with str.

Example::
>>> df = session.create_dataframe(
...     [["abc", "a"], ["abc", "s"]],
...     schema=["S", "P"],
... ).select(startswith(col("S"), col("P")))
>>> df.collect()
[Row(STARTSWITH("S", "P")=True), Row(STARTSWITH("S", "P")=False)]
Copy