pyspark.sql.functions.ln¶
- 
pyspark.sql.functions.ln(col: ColumnOrName) → pyspark.sql.column.Column[source]¶
- Returns the natural logarithm of the argument. - New in version 3.5.0. - Parameters
- colColumnor str
- a column to calculate logariphm for. 
 
- col
- Returns
- Column
- natural logarithm of given value. 
 
 - Examples - >>> df = spark.createDataFrame([(4,)], ['a']) >>> df.select(ln('a')).show() +------------------+ | ln(a)| +------------------+ |1.3862943611198906| +------------------+