title: KeyError: 12 when using native python
body: <p>Trying to create a data structure which uses the department as the 'key' and the total number of requests for that department as the 'value' but I'm getting a key error of 12. (the console explicitly says something is wrong with</p>
  <pre><code>total_department_requests = total_for_department[products[entry][&quot;department_id&quot;]] + products[entry][&quot;metrics&quot;][&quot;request_count&quot;]
  </code></pre>
  <pre><code>total_for_department = {}
  for entry in products:   
  
     #print entry
     if entry not in total_for_department:
        #print &quot;it's new&quot;
        total_for_department.update({products[entry][&quot;department_id&quot;] : products[entry][&quot;metrics&quot;][&quot;request_count&quot;]} )
     else:
        total_department_requests = total_for_department[products[entry][&quot;department_id&quot;]] + products[entry][&quot;metrics&quot;][&quot;request_count&quot;] 
        # print total_department_requests
        total_for_department.update({products[entry][&quot;department_id&quot;] : total_department_requests })
  
  print(total_for_department)
  </code></pre>
  <p>Any help would be much appreciated</p>