I am a beginner, so feedback is welcome.
I have a dictionary of data frames, with each value of the dictionary a data frame containing data from a specific country. I'd like to create a total data frame, that shows the sum of each of the data frames in the dictionary.
d['total'] = d['Germany'].add(d['Belgium'], fill_value=0)
d['total'] = d['total'].add(d['France'], fill_value=0)
This works perfectly fine for two dataframes, but I have n
number of dataframes in my dictionary, so I thought it was stupid to repeat this for each country. Is there a better way to do this?