I have a dictionary that looks like this (although is much larger):
data = {
100: 8,
110: 2,
1000: 4,
2200: 3,
4000: 1,
11000: 1,
}
Each pair consists of value:number of occurrences in my dataset. I need to calculate the median of my dataset. Any hints/ideas how to do it?
I am using Python 3.6
EDIT:
I don't want to create a list (because of the size of my dataset). The size of the list was actually the very reason to use a dictionary instead. So, I am looking for another way.