After merging of two data frames:
output = pd.merge(df1, df2, on='ID', how='outer')
I have data frame like this:
index  x    y   z
  0    2   NaN  3
  0   NaN   3   3
  1    2   NaN  4
  1   NaN   3   4
...
How to merge rows with the same index? Expected output:
index  x   y  z
  0    2   3  3
  1    2   3  4
 
     
    