MCPcopy Create free account
hub / github.com/ActiveState/code / recipe-577535.py

File recipe-577535.py

recipes/Python/577535_Aggregates_using_groupdefaultdict/recipe-577535.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#How to do aggregates using groupby, defaultdict and Counter on flat files
2#This Example computes groups for:
3#region, count(region), sum(sales), avg(sales), max(sales), min(sales)
4#

Callers

nothing calls this directly

Calls 12

defaultdictClass · 0.90
listClass · 0.85
printFunction · 0.85
groupbyClass · 0.85
minFunction · 0.85
mapFunction · 0.85
sortedFunction · 0.50
sumFunction · 0.50
maxFunction · 0.50
CounterClass · 0.50
appendMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected