pyspark.sql.functions.
floor
Computes the floor of the given value.
New in version 1.4.0.
Changed in version 3.4.0: Supports Spark Connect.
Column
column to find floor for.
nearest integer that is less than or equal to given value.
Examples
>>> df = spark.range(1) >>> df.select(floor(lit(2.5))).show() +----------+ |FLOOR(2.5)| +----------+ | 2| +----------+