snowflake.snowpark.functions.is_binary¶
- snowflake.snowpark.functions.is_binary(col: Union[Column, str]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/functions.py#L5530-L5543)¶
Returns true if the specified VARIANT column contains a binary value.
Examples:
>>> from snowflake.snowpark.types import StructField, VariantType >>> df = session.create_dataframe([[b"snow", "snow"]], schema=["a", "b"]) >>> df.select(is_binary(to_variant(df["a"])).alias("binary"), is_binary(to_variant(df["b"])).alias("varchar")).collect() [Row(BINARY=True, VARCHAR=False)]