pyspark.sql.functions.
tan
Computes tangent of the input column.
New in version 1.4.0.
Changed in version 3.4.0: Supports Spark Connect.
Column
angle in radians
tangent of the given value, as if computed by java.lang.Math.tan()
Examples
>>> import math >>> df = spark.range(1) >>> df.select(tan(lit(math.radians(45)))).first() Row(TAN(0.78539...)=0.99999...)