You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would you do a PR to update and add a test to validate this
In [8]: left = DataFrame({'key': ['a', 'c', 'e', 'a', 'c', 'e'],
...: 'lvalue': [1, 2, 3, 1, 2, 3], 'group': list('aaabbb')})
...:
...: right = DataFrame({'key': ['b', 'c', 'd'],
...: 'rvalue': [1, 2, 3]}
...:
...: )
...:
In [9]:
In [9]: pd.merge_ordered(left, right, fill_method='ffill', left_by='group')
Out[9]:
group key lvalue rvalue
0 a a 1 NaN
1 a b 1 1.0
2 a c 2 2.0
3 a d 2 3.0
4 a e 3 3.0
5 b a 1 NaN
6 b b 1 1.0
7 b c 2 2.0
8 b d 2 3.0
9 b e 3 3.0
Exsample result for 'merge_ordered' function in documentation is wrong.
https://pandas-docs.github.io/pandas-docs-travis/generated/pandas.merge_ordered.html?highlight=merge_ordered#pandas.merge_ordered
The result should be:
key lvalue group rvalue
0 a 1 a NaN
1 b 1 a 1.0
2 c 2 a 2.0
3 d 2 a 3.0
4 e 3 a 3.0
5 a 1 b NaN
6 b 1 b 1.0
7 c 2 b 2.0
8 d 2 b 3.0
9 e 3 b 3.0
The text was updated successfully, but these errors were encountered: