BUG: positional getitem indexing with list on Series with duplicate integer index fails #17347
Labels
good first issue
Indexing
Related to indexing on series/frames, not to indexes themselves
Needs Tests
Unit test(s) needed to prevent regressions
Milestone
Problem description
With a Series with integer index,
__getitem__
/ [] does positional indexing, but when you have a duplicate index and use a list indexer, you get a "ValueError: cannot reindex from a duplicate axis" (with.loc
the same works OK)Code Sample, a copy-pastable example if possible
It seems to only fail for integer index (eg with a string index
s = pd.Series(range(3), index=['a', 'a', 'b'])
the equivalent works ok)The text was updated successfully, but these errors were encountered: