I have a dataframe in following format -
Col1 |cnt_Test1 |cnt_Test2
_______________________________________
Stud1 | null | 2
Stud2 | 3 | 4
Stud3 | 1 | null
I want to create a new column by aggregating cnt_Test1 and cnt_Test2 to get the following result -
Col1 |cnt_Test1 |cnt_Test2 | new_Count
____________________________________________________
Stud1 | null | 2 | 2
Stud2 | 3 | 4 | 7
Stud3 | 1 | null | 1
However, I am getting the following output - where sum of a null and long integer is null
Col1 |cnt_Test1 |cnt_Test2 | new_Count
____________________________________________________
Stud1 | null | 2 | null
Stud2 | 3 | 4 | 7
Stud3 | 1 | null | null