pd.DataFrame({d: df[d] for d in df.columns if d not in dupes})
pd.concat(df.xs(d, axis=1) for d in dupes).groupby(level=0, axis=1).mean()
pd.concat([Out[24], Out[25]], axis=1)
Pandas: Create new dataframe that averages duplicates from another dataframe