I have a list of dictionaries that I want to group by a certain attribute and then sum by another. For a variable 'foo' this would be something like:
foo | groupby('a') | sum(attribute='b')
This clearly won't work because after the groupby
, I have a list of tuples. Is there any way to unpack the tuple and then repack it, so that i can maintain the work done by groupby
, but work on the second tuple value?