I have a dictionary which contains several, identically formatted, dataframes. I would like to find the max value of a specific column in all dataframes. I could iterate through the dictionary, but I assume there must be a more pythonic way to do it.
For example, say I have two dataframes (shortened for example, but they will have more numeric columns than just age:
b = pd.DataFrame({'name': ['Ted', 'Ben', 'Frank', 'Allen'],
'age': [22,38,26,35]})
g = pd.DataFrame({'name': ['Emily', 'Anna', 'Amy', 'Steph'],
'age': [18,23,44,21]})
Contained within a dict:
dict = {'Boys': b,
'Girls': g}
Then I'd assume something like this would work, but it doesn't because the dictionary is not subscriptable, which I think I understand, I'm just not sure the correct way to do it:
Max = max(dict.values()['age'])
Is there a better way without iterating through in a loop? (if it wasn't clear, the answer should be 44 in this example)