Closed
Description
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
(optional) I have confirmed this bug exists on the master branch of pandas.
>>>l = pd.DataFrame([['g', 'h', 1], ['g', 'h', 3]], columns=list('GHT'))
>>>l
G H T
0 g h 1
1 g h 3
>>>r = pd.DataFrame([[2, 1]], columns=list('TE'))
>>>r
T E
0 2 1
results
>>>pd.merge_ordered(l, r, on='T', left_by=['G'])
G | H | T | E | |
---|---|---|---|---|
0 | g | h | 1 | nan |
1 | g | h | 3 | nan |
expected
>>>pd.merge_ordered(l, r, on='T', left_by=['G'])
G | H | T | E | |
---|---|---|---|---|
0 | g | h | 1 | nan |
1 | g | h | 2 | 1 |
2 | g | h | 3 | nan |