4 ms·
Here is a more concise Pandas version (though Pandas may be overkill for this task): import pandas as pd pd.DataFrame(mylist).groupby('thing', as_index=Fa
by psyklic 5y ago
Here is a more concise Pandas version (though Pandas may be overkill for this task):
import pandas as pd
pd.DataFrame(mylist).groupby('thing', as_index=False).sum().to_dict('records')
- oli5679 5y agoThanks this is great