I don't know exactly how you got multiple columns with same name, so i supposed that come from some kind of merge.
This input make the following output
df = pd.DataFrame({'Back Vowels': ["a:", "o:"],
'x': [-26.69,"..."],
'y': [-15.56,"..."],})
df2 = pd.DataFrame({'Back Vowels': ["a:", "o:"],
'x': [-40.06,"..."],
'y': [-11.89,"..."],})
df3 = pd.DataFrame({'Back Vowels': ["a:", "o:"],
'x': [-49.59,"..."],
'y': [-7.5,"..."],})
df = pd.merge(pd.merge(df,df2,'inner','Back Vowels'),df3,'inner', 'Back Vowels')
df= df.rename(columns={"x_x": "x", "x_y": "x", "y_x": "y" , "y_y": "y"})
Output:
Back Vowels x y x y x y
0 a: -26.69 -15.56 -40.06 -11.89 -49.59 -7.5
1 o: ... ... ... ... ... ...
This function will merge columns with same names together:
def same_merge(x): return ','.join(x[x.notnull()].astype(str))
Apply the function :
df_new = df.groupby(level=0, axis=1).apply(lambda x: x.apply(same_merge, axis=1))
Make the columns be arrays :
df_new['x'] = df_new['x'].str.split(",")
df_new['y'] = df_new['y'].str.split(",")
Finally explode the columns to get desired output:
df_final = df_new.explode(list('xy')).reset_index(drop=True)
Final output:
Back Vowels x y
0 a: -26.69 -15.56
1 a: -40.06 -11.89
2 a: -49.59 -7.5
3 o: ... ...
4 o: ... ...
5 o: ... ...