Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
DataFrame.ix losing row ordering when index has duplicates #3561
Comments
|
thanks for the catch, this is a case that though worked, was using a set like indexer so the order was not guaranteeed - provided an opportunity to refactor a bit...PR coming soon |
|
Unique
Duplicate
@dalejung @y-p @wesm |
jreback
referenced
this issue
May 10, 2013
Merged
BUG: (GH3561) non-unique indexers with a list-like now return in the same order as the passed values #3563
|
re:
yeah, that is inconsistent. |
|
I think for consistency sake it should be the same. To be honest, I don't have a use case for indexing a non-existent label or an iterable key that contains a duplicate. I came across the bug when a source file upstream had a duplicate row. Thanks for the quick patch. |
|
np...we have been fixing duplicate indicies lately (again not there is that much use for them), but they should work....will be merged soon |
dalejung commentedMay 10, 2013
The problem is that the resulting DataFrame keeps the ordering of the
df.indexand not therowskey. You'll notice that therowskey doesn't reference a duplicate value.