You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This actually is the behavior I would expect and you've identified a pathological ambiguous case where it's very hard for the code to know what's the right thing to do. ix uses location-based indexing whenever a sequence of integers is passed as long as the index is not integers. But in this case of course:
In [1]: s = Series([0, 1, 2], index=['a', 0, 1])
In [2]: s
Out[2]:
a 0
0 1
1 2
In [3]: s.index.inferred_type
Out[3]: 'mixed'
You can force exact label-indexing using the reindex function. That is actually the best way to guarantee exact label-based indexing:
Series in 0.7 RC1 have some weird behaviour when selecting by index.
The text was updated successfully, but these errors were encountered: