Python
22
Вклад в тег
import pandas as pd
lst=[{'id': 2785280, 'score': 13},
{'id': 66560002, 'score': 4},
{'id': 180432899, 'score': 7},
{'id': 52793348, 'score': 5},
{'id': 86411270, 'score': 5},
{'id': 2334728, 'score': 2},
{'id': 2523146, 'score': 4},
{'id': 159318028, 'score': 5},
]
df=pd.DataFrame(lst)
df=df.groupby('id')['score'].sum()