snowflake.snowpark.functions.contains¶
- snowflake.snowpark.functions.contains(col: Union[Column, str], string: Union[Column, str]) 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 | ------------