I am trying to come up with an elegant way to achieve the following:
Start with a list of dictionaries:
dict_list = [
{0: [1, 2], 1: [3, 4]}
{0: [5, 6], 1: [7, 8]}
]
The keys are identical across each dictionary in the list. Each key in each dictionary has an array of values.
I want to get a single "summary" dictionary which contains the same keys, and the element-by-element means of the arrays:
means =
{0: [3, 4], 1: [5, 6]}
Any help is much appreciated!