pyspark.sql.functions.ceiling¶
-
pyspark.sql.functions.
ceiling
(col: ColumnOrName) → pyspark.sql.column.Column[source]¶ Computes the ceiling of the given value.
New in version 1.4.0.
Changed in version 3.4.0: Supports Spark Connect.
- Parameters
- col
Column
or str target column to compute on.
- col
- Returns
Column
the column for computed results.
Examples
>>> import pyspark.sql.functions as sf >>> spark.range(1).select(sf.ceil(sf.lit(-0.1))).show() +----------+ |CEIL(-0.1)| +----------+ | 0| +----------+