I have a frequency distribution dictionary as a feature column in a pandas dataframe.
I want to join all the key value pairs from the dictionary for a given week and combine them such that sum of frequencies for the words that repeat in the week updates the key-value pair for the new dictionary.
Ex:
dict{'apple' : 3, 'banana' : 4}
dict{'apple' : 5, 'banana' : 7, 'orange' : 2}
# to become
dict{'apple' : 8, 'banana' : 11, 'orange' : 2}
Is there a way to do this that isn't manually creating a new dictionary and searching each one item by item?