Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
left join fails in case of non-unique indices #5391
Comments
|
can u post the frames that reproduce this? |
|
below is an example; As I mentioned above, I understand that the
|
|
works in the case of an outer join, so could be a bug (or their is some sort of uniqueness guarantee there)...mark as a bug
|
jreback
modified the milestone: 0.15.0, 0.14.0
Apr 4, 2014
behzadnouri
referenced
this issue
Jul 27, 2014
Closed
BUG: left join on index with multiple matches now works (GH5391) #7853
jreback
modified the milestone: 0.15.0, 0.15.1
Jul 28, 2014
|
closed by #7853 |
jreback
closed this
Aug 21, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
behzadnouri commentedOct 30, 2013
It seems to me that join operation fails if the index is not of unique values. The particular circumastance that I observed this was with multi-index:
I understand that the above join operation is not well-defined for non-unique index values, but pandas gives wrong values even for unique matches. ( no warnings, error messages whatsoever )
In case checking for index integrity has a heavy performance cost, it should be documented that this method fails if the index is not unique. ( or alternatively have the optional argument to enforce integrity check )
I could get correct join by doing below: