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
For each row in the left DataFrame:
A “backward” search selects the last row in the right DataFrame whose ‘on’ key is less than or equal to the left’s key.
For each row in the left DataFrame:
A “backward” search selects the last row in the **left** DataFrame whose ‘on’ key is less than or equal to the left’s key.
The text was updated successfully, but these errors were encountered:
I'll add that this works fine when the left and right on names are different and one uses left_on and right_on; in that case I keep the right_on column from the result.
I'm going to say, as someone who just tracked down a problem in my code due to an unexpected behavior of merge_asof direction='backward', that if the behavior is different depending on whether the column names are the same or different and whether you use on or left_on/right_on, then that's actually a bug, not a documentation issue.
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/reference/api/pandas.merge_asof.html
Documentation problem
This is incorrect, as evidenced here:
Suggested fix for documentation
The text was updated successfully, but these errors were encountered: