PySpark replace null in column with value in other column September 6, 2023 by Tarik We can use coalesce from pyspark.sql.functions import coalesce df.withColumn("B",coalesce(df.B,df.A))