snowflake.snowpark.functions.is_varchar¶
- snowflake.snowpark.functions.is_varchar(col: Union[Column, str]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/functions.py#L5546-L5559)¶
Returns true if the specified VARIANT column contains a string.
Examples:
>>> from snowflake.snowpark.types import StructField, VariantType >>> df = session.create_dataframe([["abc", 123]], schema=["a", "b"]) >>> df.select(is_char(to_variant(df["a"])).alias("varchar"), is_char(to_variant(df["b"])).alias("int")).collect() [Row(VARCHAR=True, INT=False)]