I have a df with two columns and I want to combine both columns ignoring the NaN values. The catch is that sometimes both columns have NaN values in which case I want the new co
fillna
sum(1)
replace('', np.nan)
df.fillna('').sum(1).replace('', np.nan) 0 apple-martini 1 apple-pie 2 strawberry-tart 3 dessert 4 NaN dtype: object