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

snowflake.snowpark.functions.is_integer

snowflake.snowpark.functions.is_integer(col: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L4620-L4632)

Returns true if the specified VARIANT column contains a integer value.

Examples:

>>> from snowflake.snowpark.types import StructField, VariantType
>>> df = session.create_dataframe([[1, "X"]], schema=["a", "b"])
>>> df.select(is_integer(to_variant(df["a"])).alias("int"), is_integer(to_variant(df["b"])).alias("varchar")).collect()
[Row(INT=True, VARCHAR=False)]
Copy
Language: English