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
Slicing in Series with MultiIndex does not seem to work on master with .ix or .loc. This is not comparable with previous versions.
In [54]:
s=pd.Series([1,2,3])
s.index=pd.MultiIndex.from_tuples([(0,0),(1,1), (2,1)])
s[:,0]
Out[55]:
1223In [56]:
s.ix[:,1]
IndexingErrorTraceback (mostrecentcalllast)
<ipython-input-56-3163789d3245>in<module>()
---->1s.ix[:,1]
/cellar/users/agross/anaconda2/lib/python2.7/site-packages/pandas-0.13.0_120_gdd89ce4-py2.7-linux-x86_64.egg/pandas/core/indexing.pycin__getitem__(self, key)
52pass53--->54returnself._getitem_tuple(key)
55else:
56returnself._getitem_axis(key, axis=0)
/cellar/users/agross/anaconda2/lib/python2.7/site-packages/pandas-0.13.0_120_gdd89ce4-py2.7-linux-x86_64.egg/pandas/core/indexing.pycin_getitem_tuple(self, tup)
593594# no multi-index, so validate all of the indexers-->595self._has_valid_tuple(tup)
596597# ugly hack for GH #836/cellar/users/agross/anaconda2/lib/python2.7/site-packages/pandas-0.13.0_120_gdd89ce4-py2.7-linux-x86_64.egg/pandas/core/indexing.pycin_has_valid_tuple(self, key)
103fori, kinenumerate(key):
104ifi>=self.obj.ndim:
-->105raiseIndexingError('Too many indexers')
106ifnotself._has_valid_type(k, i):
107raiseValueError("Location based indexing can only have [%s] "IndexingError: Toomanyindexers
The text was updated successfully, but these errors were encountered:
Allowing multiple indexers on a Series IMHO is wrong and shouldn't be allowed; instead you should use xs
(to be fair this didn't exist in 0.12, that's why its allowed :)
so fixed this, and fixed xs on a Series which wasn't working properly
Slicing in Series with MultiIndex does not seem to work on master with .ix or .loc. This is not comparable with previous versions.
The text was updated successfully, but these errors were encountered: