From e86c3cfb0b36a6ed3ab5f77dae7c87506e7c1f3f Mon Sep 17 00:00:00 2001 From: Christian Burke Date: Sun, 5 Mar 2017 16:57:01 -0800 Subject: [PATCH] Update frame.py https://github.com/pandas-dev/pandas/issues/15582 --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index b3e43edc3eb55..e1ce159d1154c 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4591,7 +4591,7 @@ def _join_compat(self, other, on=None, how='left', lsuffix='', rsuffix='', other = DataFrame({other.name: other}) if isinstance(other, DataFrame): - return merge(self, other, left_on=on, how=how, + return merge(other, self, left_on=on, how=how, left_index=on is None, right_index=True, suffixes=(lsuffix, rsuffix), sort=sort) else: