pyspark.sql.functions.expm1#

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

Computes the exponential of the given value minus one.

New in version 1.4.0.

Changed in version 3.4.0: Supports Spark Connect.

Parameters
colColumn or str

column to calculate exponential for.

Returns
Column

exponential less one.

Examples

>>> df = spark.range(1)
>>> df.select(expm1(lit(1))).first()
Row(EXPM1(1)=1.71828...)