考虑此熊猫数据框:
import pandas as pd
df = pd.DataFrame(columns=['city','pop'])
df['city'] = ['faa','foo','faa','faa','foo']
df['pop'] = [10,20,15,30,60]
city pop
0 faa 10
1 foo 20
2 faa 15
3 faa 30
4 foo 60
如何总结每个城市的流行音乐?我想获得
city pop
0 faa 55
1 foo 80