pyspark.sql.functions.cbrt#

pyspark.sql.functions.cbrt(col)[source]#

Computes the cube-root of the given value.

New in version 1.4.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.range(1)
>>> df.select(cbrt(lit(27))).show()
+--------+
|CBRT(27)|
+--------+
|     3.0|
+--------+