pyspark.sql.functions.atanh

pyspark.sql.functions.atanh(col: ColumnOrName) → pyspark.sql.column.Column[source]

Computes inverse hyperbolic tangent of the input column.

New in version 3.1.0.

Changed in version 3.4.0: Supports Spark Connect.

Parameters
colColumn or str

target column to compute on.

Returns
Column

the column for computed results.

Examples

>>> df = spark.createDataFrame([(0,), (2,)], schema=["numbers"])
>>> df.select(atanh(df["numbers"])).show()
+--------------+
|ATANH(numbers)|
+--------------+
|           0.0|
|           NaN|
+--------------+