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