pyspark.sql.functions.ceilΒΆ

pyspark.sql.functions.ceil(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
colColumn or str

target column to compute on.

Returns
Column

the column for computed results.

Examples

>>> df = spark.range(1)
>>> df.select(ceil(lit(-0.1))).show()
+----------+
|CEIL(-0.1)|
+----------+
|         0|
+----------+