I have hundreds of dictionaries that look like this. They all have the same keys (New York, Chicago etc..) but have different values. There are no missing values.
[{'New York': 'cloudy', 'Chicago': 'snowy', 'Seattle': 'rainy'},
{'New York': 'cloudy', 'Chicago': 'hailing', 'Seattle': 'sunny'},
{'New York': 'sunny', 'Chicago': 'snowy', 'Seattle': 'rainy'},
{'New York': 'hailing', 'Chicago': 'snowy', 'Seattle':'snowy'}]
I want to count the most common "weather" value for each key. And then combine them all into one final list that just outputs each city with the most common key value it has.
{'New York': 'cloudy', 'Chicago': 'snowy', 'Seattle': 'rainy'}
How can I achieve this?