I have huge dictionary like this

{0: {'age': 19, 'sex': 'female', 'bmi': 27.9, 'children': 0, 'smoker': 'yes', 'region': 'southwest', 'charges': 16884.924}, 1: {'age': 18, 'sex': 'male', 'bmi': 33.77, 'children': 1, 'smoker': 'no', 'region': 'southeast', 'charges': 1725.5523}

and so on... I would like to take all the ages and calculate the mean for example based on the region...
I tried with a function and loop it through the dct and if region == (the ones I want) it returns the mean, I think I am far away from my goal.. any ideas please?

I would like to do it without import anything

thank you.