I have df similar to this made up one:
index1 index2 col1 col2 col1 col2 col1 col2
0 0 2 4 NAN NAN NAN NAN
0 1 NAN NAN 5 6
1 0 NAN NAN NAN NAN 7 8
I want to get:
index1 index2 col1 col2
0 0 2 4
0 1 5 6
1 0 7 8
maybe it worth mention that the input df of my question is a result of cocncat of many dataframes and I couldn't get rid of the duplications. Every df who been concat is looking like this:
index1 index2 col1
1 0 11
and it contain more columns but only one row. There are no two dataframes with conflict over a data cell in the result dataframe I wish to create.
Thanks