Pandas: Mean of columns with the same names,df = df.reset_index()