data key ohio ohio ohio nevada nevada key nevada ohio event event in this caseyou have to indicate multiple columns to merge on as list (pay attention to the handling of duplicate index values)in [ ]pd merge(lefthrighthleft_on=['key ''key ']right_index=trueout[ ]data key key event event nevada ohio ohio ohio ohio in [ ]pd merge(lefthrighthleft_on=['key ''key ']right_index=truehow='outer'out[ ]data key key event event nan nevada nevada nevada nan nan ohio ohio ohio ohio using the indexes of both sides of the merge is also not an issuein [ ]left dataframe([[ ][ ][ ]]index=[' '' '' ']columns=['ohio''nevada']in [ ]right dataframe([[ ][ ][ ][ ]]index=[' '' '' '' ']columns=['missouri''alabama']in [ ]left out[ ]ohio nevada in [ ]right out[ ]missouri alabama in [ ]pd merge(left right how='outer'left_index=trueright_index=trueout[ ]ohio nevada missouri alabama nan nan nan nan nan nan combining and merging data sets www it-ebooks info