pyspark.sql.functions.tanh¶
-
pyspark.sql.functions.
tanh
(col: ColumnOrName) → pyspark.sql.column.Column[source]¶ Computes hyperbolic tangent of the input column.
New in version 1.4.0.
Changed in version 3.4.0: Supports Spark Connect.
- Parameters
- col
Column
or str hyperbolic angle
- col
- Returns
Column
hyperbolic tangent of the given value as if computed by java.lang.Math.tanh()
Examples
>>> import math >>> df = spark.range(1) >>> df.select(tanh(lit(math.radians(90)))).first() Row(TANH(1.57079...)=0.91715...)