Everything you want to know about Counters in Python.
Using Defaultdict in Python.
How to create stacked waterfall chart in Python using Matplotlib?