📅  最后修改于: 2022-03-11 14:47:17.279000             🧑  作者: Mango
df = df.groupby(by='domain', as_index=False).agg({'ID': pd.Series.nunique})
print(df)
domain ID
0 fb 1
1 ggl 1
2 twitter 2
3 vk 3