snowflake.snowpark.functions.degrees¶
- snowflake.snowpark.functions.degrees(e: Union[Column, str]) Column [source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/src/snowflake/snowpark/functions.py#L2334-L2351)¶
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)]