pyspark.sql.functions.
cot
Computes cotangent of the input column.
New in version 3.3.0.
Changed in version 3.4.0: Supports Spark Connect.
Column
angle in radians.
cotangent of the angle.
Examples
>>> import math >>> df = spark.range(1) >>> df.select(cot(lit(math.radians(45)))).first() Row(COT(0.78539...)=1.00000...)