From 8b92d931cbdd303661ee54c1f6e13392fe36c329 Mon Sep 17 00:00:00 2001 From: Deepyaman Datta Date: Tue, 16 May 2023 10:15:19 +0200 Subject: [PATCH 1/2] CLN: Fix typo in parameter name, standardize a bit --- pandas/core/reshape/merge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/reshape/merge.py b/pandas/core/reshape/merge.py index 7c046bddab4e8..a271d68d8f57e 100644 --- a/pandas/core/reshape/merge.py +++ b/pandas/core/reshape/merge.py @@ -1623,7 +1623,7 @@ def get_join_indexers( """ assert len(left_keys) == len( right_keys - ), "left_key and right_keys must be the same length" + ), "left_keys and right_keys must be the same length" # fast-path for empty left/right left_n = len(left_keys[0]) @@ -1960,7 +1960,7 @@ def _validate_left_right_on(self, left_on, right_on): self.right_by = [self.right_by] if len(self.left_by) != len(self.right_by): - raise MergeError("left_by and right_by must be same length") + raise MergeError("left_by and right_by must be the same length") left_on = self.left_by + list(left_on) right_on = self.right_by + list(right_on) From d222f2be12634fd3e2fa89b7416a8890ac3ef0a9 Mon Sep 17 00:00:00 2001 From: Deepyaman Datta Date: Tue, 16 May 2023 15:32:01 +0100 Subject: [PATCH 2/2] Update test_merge_asof.py --- pandas/tests/reshape/merge/test_merge_asof.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/reshape/merge/test_merge_asof.py b/pandas/tests/reshape/merge/test_merge_asof.py index 0aa9026cc0808..2f0861201155b 100644 --- a/pandas/tests/reshape/merge/test_merge_asof.py +++ b/pandas/tests/reshape/merge/test_merge_asof.py @@ -455,7 +455,7 @@ def test_multiby_indexed(self): tm.assert_frame_equal(expected, result) with pytest.raises( - MergeError, match="left_by and right_by must be same length" + MergeError, match="left_by and right_by must be the same length" ): merge_asof( left,