pyspark.sql.functions.
log10
Computes the logarithm of the given value in Base 10.
New in version 1.4.0.
Changed in version 3.4.0: Supports Spark Connect.
Column
column to calculate logarithm for.
logarithm of the given value in Base 10.
Examples
>>> df = spark.range(1) >>> df.select(log10(lit(100))).show() +----------+ |LOG10(100)| +----------+ | 2.0| +----------+