I have multiple dataframes with different index and different columns. I want to merge them and hope to combined those columns with same names into an one. I have tried outer join but it would not merge columns with same names. Also for pd.update, but since I have data with different indexes this seems not working well. Could anyone give me some suggestions? Thanks.
INPUT>
ID Cat1 Cat2
1 0 75
2 61 0
ID Cat2 Cat3
3 5 75
ID Cat2 Cat4
4 54 40
5 20 38
Desired Output>
ID Cat1 Cat2 Cat3 Cat4
1 0 75 0 0
2 61 0 0 0
3 0 5 75 0
4 0 54 0 40
5 0 20 0 38