Say I have an dictionary of dataframes:
{'df1': name color type
Apple Yellow Fruit,
'df2': name color type
Banana Red Fruit,
'df3': name color type
Chocolate Brown Sweet
......}
And I want to merge them all into one like this:
name color type
Apple Red Fruit
Banana Yellow Fruit
Chocolate Brown Sweet
I can do it manually as follows:
merge1=pd.merge('df1','df2')
merge2=pd.merge('merge1','df3')
...
But is there a way to automatically zip through the dictionary and merge?
Any help is appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…