I am trying to merge two dataframe that are multi-index, while preserving the highest level index. The problem is merging on axis=1 results in the below two columns. Merging/joining on axis=0 drops any value in the 0_y column that has the same sub-index as an entry in )_x. An example below is (226,0), where the value 1510123295301 gets dropped if I merge/join on axis=0.
Is there any way to merge two multi-index dataframes into a single column, preserving the primary index (e.g. 226), but expanding to include non-duplicates in the right-hand column (e.g. 226(0-6))?


df2.combine_first(df)?df.combine_first(df2)? You could just reverse the dataframes.