0

I have a list of 10 dictionaries. one entry in the list looks like this:

{'mean': 0.04602368116751976,
 'ipw_mean': 0.15815917007312158,
 'sn_ipw_mean': 0.10885889200266785,
 'impute_linear': 0.09610141150547868,
 'impute_ipw_linear': 0.09164629181391748,
 'impute_iw_linear': 0.09176356580456796,
 'impute_aipw_linear': 0.09186716206401524}

The keys are all the same in each dictionary but the values are different.

I want to create a new dictionary based on these 10 dictionaries in the list that grabs all 10 values from each of the dictionaries.

expected output (where x is just one of the 10 estimates from the dictionary:

{'mean': [0.04602368116751976,x,x,x,x,x,x,x,x,x],
 'ipw_mean': [0.15815917007312158,x,x,x,x,x,x,x,x,x]],
 'sn_ipw_mean': [0.10885889200266785,x,x,x,x,x,x,x,x,x]],
 'impute_linear': [0.09610141150547868,x,x,x,x,x,x,x,x,x]],
 'impute_ipw_linear': [0.09164629181391748,x,x,x,x,x,x,x,x,x]],
 'impute_iw_linear': [0.09176356580456796,x,x,x,x,x,x,x,x,x]],
 'impute_aipw_linear': [0.09186716206401524,x,x,x,x,x,x,x,x,x]]}

how can i do this?

4

0 回答 0