How to merge (left join) using column value
from dataframe A and index of dataframe B?
For example:
>>> A >>> B
lkey value rkey value
0 foo 1 0 foo 5
1 bar 2 1 bar 6
2 baz 3 2 qux 7
3 foo 4 3 bar 8
to get:
lkey value_x rkey value_y
0 foo 1 bar 6
1 bar 2 qux 7
2 baz 3 bar 8
3 foo 4 NaN NaN