asin #
pyspark.sql.functions.asin(col) #
version: since 1.3
Inverse sine of col
, as if computed by java.lang.Math.asin()
Runnable Code:
from pyspark.sql import functions as F
# Set up dataframe
data = [{"num": 1.0},{"num": .5},{"num": 0.0}]
df = spark.createDataFrame(data)
# Use function
df = (df
.withColumn("asin", F.asin("num"))
)
df.show()
num | asin |
---|---|
1.0 | 1.5707963267948966 |
0.5 | 0.5235987755982989 |
0.0 | 0.0 |
Usage:
This is just a basic math function. Nothing special about it. Never used it.
returns: \_invoke_function_over_column("asin", col)
tags: asine, cosine, inverse sine, trigonometry, trig, sine
© 2023 PySpark Is Rad