acosh

acosh #

pyspark.sql.functions.acosh(col) #

version: since 3.1.0

Computes inverse hyperbolic cosine of the input column.

acosh

Runnable Code:

from pyspark.sql import functions as F
# Set up dataframe
data = [{"num": 1.0},{"num": 2.5},{"num": 5.0}]
df = spark.createDataFrame(data)
# Use function
df = (df
     .withColumn("acosh", F.acosh("num"))
     )
df.show()
num acosh
1.0 0.0
2.5 1.566799236972411
5.0 2.2924316695611777

Usage:

This is just a basic math function. Nothing special about it. In fact I have no idea what it means.



returns: \_invoke_function_over_column("acosh", col)

PySpark manual

tags:




© 2023 PySpark Is Rad