snowflake.snowpark.functions.as_double

snowflake.snowpark.functions.as_double(variant: Union[Column, str]) Column[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.16.0/src/snowflake/snowpark/functions.py#L6107-L6121)

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
语言: 中文