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

snowflake.snowpark.functions.degrees

snowflake.snowpark.functions.degrees(e: Union[Column, str]) Column[source]

Converts radians to degrees.

Example:

>>> import math
>>> from snowflake.snowpark.types import StructType, StructField, DoubleType, IntegerType
>>> df = session.create_dataframe(
...     [math.pi / 3, math.pi, 3 * math.pi],
...     schema=StructType([StructField("a", DoubleType())]),
... )
>>> df.select(degrees(col("a")).cast(IntegerType()).alias("DEGREES")).collect()
[Row(DEGREES=60), Row(DEGREES=180), Row(DEGREES=540)]
Copy