-
-
Save TomAugspurger/b735fad192ce878dc353 to your computer and use it in GitHub Desktop.
pandas multiIndex bug?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_f391180-py2.7-macosx-10.8-x86_64.egg/pandas/core/indexing.pyc in __getitem__(self, key) | |
39 pass | |
40 | |
---> 41 return self._getitem_tuple(key) | |
42 else: | |
43 return self._getitem_axis(key, axis=0) | |
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_f391180-py2.7-macosx-10.8-x86_64.egg/pandas/core/indexing.pyc in _getitem_tuple(self, tup) | |
202 def _getitem_tuple(self, tup): | |
203 try: | |
--> 204 return self._getitem_lowerdim(tup) | |
205 except IndexingError: | |
206 pass | |
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_f391180-py2.7-macosx-10.8-x86_64.egg/pandas/core/indexing.pyc in _getitem_lowerdim(self, tup) | |
315 new_key, = new_key | |
316 | |
--> 317 return section.ix[new_key] | |
318 | |
319 raise IndexingError('not applicable') | |
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_f391180-py2.7-macosx-10.8-x86_64.egg/pandas/core/indexing.pyc in __getitem__(self, key) | |
39 pass | |
40 | |
---> 41 return self._getitem_tuple(key) | |
42 else: | |
43 return self._getitem_axis(key, axis=0) | |
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_f391180-py2.7-macosx-10.8-x86_64.egg/pandas/core/indexing.pyc in _getitem_tuple(self, tup) | |
219 continue | |
220 | |
--> 221 retval = retval.ix._getitem_axis(key, axis=i) | |
222 | |
223 return retval | |
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_f391180-py2.7-macosx-10.8-x86_64.egg/pandas/core/indexing.pyc in _getitem_axis(self, key, axis) | |
350 lab = key | |
351 if com.is_integer(key) and not _is_integer_index(labels): | |
--> 352 return self._get_loc(key, axis=axis) | |
353 return self._get_label(lab, axis=axis) | |
354 | |
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_f391180-py2.7-macosx-10.8-x86_64.egg/pandas/core/indexing.pyc in _get_loc(self, key, axis) | |
56 | |
57 def _get_loc(self, key, axis=0): | |
---> 58 return self.obj._ixs(key, axis=axis) | |
59 | |
60 def _slice(self, obj, axis=0): | |
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_f391180-py2.7-macosx-10.8-x86_64.egg/pandas/core/frame.pyc in _ixs(self, i, axis) | |
1654 return self.irow(i) | |
1655 else: | |
-> 1656 return self.icol(i) | |
1657 | |
1658 def iget_value(self, i, j): | |
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_f391180-py2.7-macosx-10.8-x86_64.egg/pandas/core/frame.pyc in icol(self, i) | |
1637 column : Series (int) or DataFrame (slice, sequence) | |
1638 """ | |
-> 1639 label = self.columns[i] | |
1640 if isinstance(i, slice): | |
1641 # need to return view | |
/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_f391180-py2.7-macosx-10.8-x86_64.egg/pandas/core/index.pyc in __getitem__(self, key) | |
316 arr_idx = self.view(np.ndarray) | |
317 if np.isscalar(key): | |
--> 318 return arr_idx[key] | |
319 else: | |
320 if com._is_bool_indexer(key): | |
IndexError: index out of bounds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment