snowflake.snowpark.functions.is_real

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

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

Example:

>>> from snowflake.snowpark.functions import to_variant, is_real
>>> df = session.create_dataframe([[1.2, "X"]], schema=["a", "b"])
>>> df.select(is_real(to_variant("a")).as_("a"), is_real(to_variant("b")).as_("b")).collect()
[Row(A=True, B=False)]
Copy
语言: 中文