Get the min and max value and corresponding keys in a Python dictionary
# E_cv_C is dictionary of dictionaryies
E_cv_C = {'C_0.0001': {'C': 0.0001, 'E_cv': 0.0002194486353037992},
'C_0.001': {'C': 0.001, 'E_cv': 0.0001097243176518996},
'C_0.01': {'C': 0.01, 'E_cv': 9.6008777945412143e-05},
'C_0.1': {'C': 0.1, 'E_cv': 0.0001097243176518996},
'C_1': {'C': 1, 'E_cv': 0.0001097243176518996}}
min_key = min(E_cv_C.keys(), key=lambda x:E_cv_C[x]['E_cv'])
min_value = min(E_cv_C.values(), key=lambda x:x['E_cv'])