pyspark.sql.functions.ucaseΒΆ

pyspark.sql.functions.ucase(str: ColumnOrName) → pyspark.sql.column.Column[source]ΒΆ

Returns str with all characters changed to uppercase.

New in version 3.5.0.

Parameters
strColumn or str

Input column or strings.

Examples

>>> import pyspark.sql.functions as sf
>>> spark.range(1).select(sf.ucase(sf.lit("Spark"))).show()
+------------+
|ucase(Spark)|
+------------+
|       SPARK|
+------------+