pyspark.sql.functions.tan¶
- 
pyspark.sql.functions.tan(col: ColumnOrName) → pyspark.sql.column.Column[source]¶
- Computes tangent of the input column. - New in version 1.4.0. - Changed in version 3.4.0: Supports Spark Connect. - Parameters
- colColumnor str
- angle in radians 
 
- col
- Returns
- Column
- 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...)