Catatan
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba masuk atau mengubah direktori.
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba mengubah direktori.
Menghitung kosinus hiperbolik terbalik (juga dikenal sebagai arkosh) dari kolom atau ekspresi yang diberikan. Mendukung Spark Connect.
Untuk fungsi Databricks SQL yang sesuai, lihat acosh fungsi.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.acosh(col=<col>)
Parameter-parameternya
| Pengaturan | Tipe | Description |
|---|---|---|
col |
pyspark.sql.Column or column name |
Kolom atau ekspresi target untuk menghitung kosinus hiperbolik terbalik. |
Pengembalian Barang
pyspark.sql.Column: Objek kolom baru yang mewakili kosinus hiperbolik terbalik input.
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(1,), (2,)], ["value"])
df.select("*", dbf.acosh(df.value)).show()
+-----+------------------+
|value| ACOSH(value)|
+-----+------------------+
| 1| 0.0|
| 2|1.3169578969248...|
+-----+------------------+
from pyspark.databricks.sql import functions as dbf
spark.sql(
"SELECT * FROM VALUES (-0.5), (0.5), (NULL) AS TAB(value)"
).select("*", dbf.acosh("value")).show()
+-----+------------+
|value|ACOSH(value)|
+-----+------------+
| -0.5| NaN|
| 0.5| NaN|
| NULL| NULL|
+-----+------------+