I want to replace null values in one column with the values in an adjacent column ,for example if i have
A|B 0,1 2,null 3,null 4,2
I want i
df.rdd.map(lambda row: row if row[1] else Row(a=row[0],b=row[0])).toDF().show()