Skip to content

Commit 62b2ff3

Browse files
maxalbertjorisvandenbossche
authored andcommitted
DOC/ERR: improve readability of error message (#14597)
1 parent 85a6464 commit 62b2ff3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/tools/merge.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,8 @@ def _validate_specification(self):
816816
self.left_on = self.right_on = common_cols
817817
elif self.on is not None:
818818
if self.left_on is not None or self.right_on is not None:
819-
raise MergeError('Can only pass on OR left_on and '
820-
'right_on')
819+
raise MergeError('Can only pass argument "on" OR "left_on" '
820+
'and "right_on", not a combination of both.')
821821
self.left_on = self.right_on = self.on
822822
elif self.left_on is not None:
823823
n = len(self.left_on)

0 commit comments

Comments
 (0)