pyspark.sql.functions.
degrees
Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
New in version 2.1.0.
Changed in version 3.4.0: Supports Spark Connect.
Column
angle in radians
angle in degrees, as if computed by java.lang.Math.toDegrees()
Examples
>>> import math >>> df = spark.range(1) >>> df.select(degrees(lit(math.pi))).first() Row(DEGREES(3.14159...)=180.0)