I want to combine 2 columns into 1 in pandas, when I searched on google, the only options I got were:merge,concatenate, join. Neither of those solve the issue I'm having here.
Goal:
from base_dataframe:
Name Mark_x Mark_y Mark_z
A 90 nan nan
B nan 85 nan
C nan nan 70
D 30 nan nan
to desired_dataframe:
Name Mark
A 90
B 85
C 70
D 30
What I have is the above dataframe and only 1 of the Mark columns will ever be not null(prerequisite). Stuck on google search for 1 hour now and don't know what function I should look into that will help solve this. If you know any function that could be related to this problem, please let me know so I can look into it, thanks.