If I have a pandas dataframe like so:
a1 0.116667 NaN NaN
a2 NaN 0.516667 NaN
a3 NaN 0.006667 NaN
a4 NaN NaN 0.426667
a5 NaN 0.506667 NaN
a6 0.583333 NaN NaN
a7 0.550000 NaN NaN
and I want to combine the columns so that if there is a number in any of the columns and NaN in the other two the result is one column, with the expected output:
a1 0.116667
a2 0.516667
a3 0.006667
a4 0.426667
a5 0.506667
a6 0.583333
a7 0.550000