sparkbyexamples.com
PySpark Replace Empty Value With None/null on DataFrame
In PySpark DataFrame use when().otherwise() SQL functions to find out if a column has an empty value and use withColumn() transformation to replace a
Naveen Nelamali