In [2]:
left = pd.DataFrame({'key': ['a', 'b', 'c'],
                     'value': [1, 2, 3]})
left
Out[2]:
key value
0 a 1
1 b 2
2 c 3
In [3]:
right = pd.DataFrame({'key': ['a', 'b', 'd'],
                      'value': [1, 2, 4]})
right
Out[3]:
key value
0 a 1
1 b 2
2 d 4
In [4]:
left.merge(right, on='key', how='outer')
Out[4]:
key value_x value_y
0 a 1.0 1.0
1 b 2.0 2.0
2 c 3.0 NaN
3 d NaN 4.0
In [5]:
pd.concat([left.set_index('key'), right.set_index('key')], axis=1) \
    .reset_index()
Out[5]:
key value value
0 a 1.0 1.0
1 b 2.0 2.0
2 c 3.0 NaN
3 d NaN 4.0