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: