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

snowflake.snowpark.functions.is_double¶

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

Returns true if the specified VARIANT column contains a floating-point value, fixed-point decimal, or integer.

Examples:

>>> from snowflake.snowpark.types import StructField, VariantType
>>> df = session.create_dataframe([[1.2, "X"]], schema=["a", "b"])
>>> df.select(is_double(to_variant(df["a"])).alias("double"), is_double(to_variant(df["b"])).alias("varchar")).collect()
[Row(DOUBLE=True, VARCHAR=False)]
Copy