title: Find mean by category in list of dictionaries (non-Pandas solution)
body: <p>I'm trying to find a non-pandas solution to summarising by category. </p>
  
  <p>I have this lookup table as a list of dicts:</p>
  
  <pre><code>lookup_table = [
  {"urban_rural": "urban", "technology": "FTTC", "speed": 50},
  {"urban_rural": "rural", "technology": "FTTC", "speed": 10},
  {"urban_rural": "urban", "technology": "FTTC", "speed": 30}
  ]
  </code></pre>
  
  <p>I want to find the mean of 'speed' by category ('urban_rural', and 'technology') so I end up with this:</p>
  
  <pre><code>lookup_table_mean_values = [
  {"urban_rural": "urban", "technology": "FTTC", "speed": 40},
  {"urban_rural": "rural", "technology": "FTTC", "speed": 10}
  ]
  </code></pre>
  
  <p><strong>Edit (add current code):</strong></p>
  
  <p>I didn't want to muddy the water, but as @Patrick Artner has requested, here's where I'm at. Currently <a href="https://stackoverflow.com/questions/22416450/finding-mean-of-a-values-in-a-dictionary?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">this question</a> provides a suggested answer for a dict, providing both simple loop, and Iteritems options, however I've not been able to adapt to the list of dict structure so far. </p>
  
  <p>I would be quite happy using something like this:</p>
  
  <pre><code>lookup_table_mean_values =[float(sum(values)) / len(values) for key, values in lookup_table .iteritems()]
  </code></pre>