I have two columns containing strings and NAs and I want to combine them into 1. I feel this should be fairly simple but cannot seem to get it to work or find the answer on here. Below is the result I am after.
S1 S2 S
A Nan A
A Nan A
A Nan A
A Nan A
Nan C C
Nan C C
Nan C C
Nan C C
Nan Nan Nan
Nan Nan Nan
Nan Nan Nan
B Nan B
B Nan B
B Nan B
B Nan B
B Nan B
I thought df['S'] = df['S1']+ df['S2']
would work but no.
Really feel like there will be an obvious fix, thanks in advance.