- 
          
- 
        Couldn't load subscription status. 
- Fork 19.2k
Checks for left_index and right_index merge parameters #14434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -109,6 +109,15 @@ def test_merge_misspecified(self): | |
| self.assertRaises(ValueError, merge, self.df, self.df2, | ||
| left_on=['key1'], right_on=['key1', 'key2']) | ||
|  | ||
| def test_index_and_on_parameters_confusion(self): | ||
| self.assertRaises(ValueError, merge, self.df, self.df2, how='left', | ||
|          | ||
| left_index=False, right_index=['key1', 'key2']) | ||
| self.assertRaises(ValueError, merge, self.df, self.df2, how='left', | ||
| left_index=['key1', 'key2'], right_index=False) | ||
| self.assertRaises(ValueError, merge, self.df, self.df2, how='left', | ||
| left_index=['key1', 'key2'], | ||
| right_index=['key1', 'key2']) | ||
|  | ||
| def test_merge_overlap(self): | ||
| merged = merge(self.left, self.left, on='key') | ||
| exp_len = (self.left['key'].value_counts() ** 2).sum() | ||
|  | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this to the bug fixes section? (I think that it is rather a bug that it accepted a wrong value, than a new feature that it now checks that)