pyspark.sql.functions.
trim
Trim the spaces from both ends for the specified string column.
New in version 1.5.
previous
pyspark.sql.functions.translate
next
pyspark.sql.functions.trunc