I am having Dataframe which has multiple columns in which some columns are equal (Same key in trailing end eg: column1 = 'a/first', column2 = 'b/first'). I want to merge these two columns. Please help me out to solve the problem.
My Dataframe looks like
name g1/column1 g1/column2 g1/g2/column1 g2/column2
AAAA 10 20 nan nan
AAAA nan nan 30 40
My result will be like as follows
name g1/column1 g1/column2
AAAA 10 20
AAAA 30 40
Thanks in advance