Skip to content

BUG: df.join(df2, how='right') TypeError #11545

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

Closed
wants to merge 1 commit into from
Closed

BUG: df.join(df2, how='right') TypeError #11545

wants to merge 1 commit into from

Conversation

nbonnotte
Copy link
Contributor

Issue #11519

Somehow right joins had been forgotten in a previous bugfix. There were tests already written that should have seen the problem, but they had been commented out because the expected results were wrong, because of a subtlety in the way non-unique index are handled.

Thanks for the labels "difficulty novice" and "effort low": I'm using pandas every day, and I'm glad I could contribute that easily.

@jreback jreback added Bug Indexing Related to indexing on series/frames, not to indexes themselves Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Nov 8, 2015
@jreback jreback added this to the 0.17.1 milestone Nov 8, 2015
self.assertTrue(res.equals(eres))
tm.assert_numpy_array_equal(lidx, elidx)
tm.assert_numpy_array_equal(ridx, eridx)

"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is still commented out here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. They are the remnants of some old tests that had been commented because they were not working (at least, it seems like it). I've corrected and adapted the most part, but I have no idea what the rest was intended for.

I've had a conservative approach, and kept them, but sure I can do a bit of cleaning and remove them. What should I do?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, see what they do (and of course if they make sense). I suspect that the code is actually working, so adjust the tests if you would.

@nbonnotte
Copy link
Contributor Author

Ok, the commented test is redundant with what is just before, so I'm removing it.

@jreback
Copy link
Contributor

jreback commented Nov 10, 2015

pls add a whatsnew note (bug fixes) & squash

@nbonnotte
Copy link
Contributor Author

Done

@jreback
Copy link
Contributor

jreback commented Nov 10, 2015

can you add all of the examples from the issue as well. (in tests/tools/test_merge.py) would be a good location

@nbonnotte
Copy link
Contributor Author

I've put them in what I thought was the most appropriate test method, I hope that's all right.

@jreback
Copy link
Contributor

jreback commented Nov 11, 2015

merged via d78266e

thanks!

@dragoljub
Copy link

@nbonnotte @jreback

Thanks for closing this out! 👍

@nbonnotte nbonnotte deleted the bug-index-right-join branch November 16, 2015 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants