df = df.reindex_axis(['keyword', 'weight', 'other keywords'], axis=1)
df = df.rename_axis(None).reset_index()
df.columns = ['keyword', 'frequency', 'avg weight', 'sum other keywords']
print(df)
pandas groupby with count, sum and avg