left = pd.DataFrame({'key': ['a', 'b', 'c'],
'value': [1, 2, 3]})
left
right = pd.DataFrame({'key': ['a', 'b', 'd'],
'value': [1, 2, 4]})
right
left.merge(right, on='key', how='outer')
pd.concat([left.set_index('key'), right.set_index('key')], axis=1) \
.reset_index()