I am trying to replace all null data in column count_1 with data that may be in column count_2. Below is the expected output with a given input. How can I do this in Spark Scala?
Input Dataframe
name count_1 count_2
Java 10000 null
Python null 20000
Scala 30000 null
R null null
Swift 50000 65000
Output Dataframe
name merged
Java 10000
Python 20000
Scala 30000
R null
Swift 50000