pyspark.sql.functions.coalesce
If you want to return the first non zero from list of column you can use coalesce function in PySpark. COALESCE simply returns the first value out of a list that is not NULL. COALESCE is a powerful tool if you are returning numerous null values and if you need the first non null value.
Syntax
Sample Code
Reference