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

snowflake.snowpark.functions.as_double

snowflake.snowpark.functions.as_double(variant: Union[Column, str]) Column[source]

Casts a VARIANT value to a floating-point value.

Example::
>>> df = session.sql("select 1.2345::variant as a")
>>> df.select(as_double("a").alias("result")).show()
------------
|"RESULT"  |
------------
|1.2345    |
------------
Copy