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

snowflake.snowpark.functions.contains¶

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

Returns if col contains string for each row. See CONTAINS <https://docs.snowflake.com/en/sql-reference/functions/contains>

Example

>>> df = session.create_dataframe([[1,2], [3,4], [5,5] ], schema=["a","b"])
>>> df.select(contains(col("a"), col("b")).alias("result")).show()
------------
|"RESULT"  |
------------
|False     |
|False     |
|True      |
------------
Copy