pyspark.sql.functions.ucase#

pyspark.sql.functions.ucase(str)[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|
+------------+