Bug with irow and list of indices · Issue #654 · pandas-dev/pandas (original) (raw)

from pandas import *
import numpy as np
x=DataFrame(np.arange(9).reshape(3,3))
x[0].iget([0,1])
0 0
1 3
x.icol([0,1])
0 1
0 0 1
1 3 4
2 6 7
x.irow([0,1])

Traceback (most recent call last):
File "<pyshell#5>", line 1, in
x.irow([0,1])
File "C:\Python27\lib\site-packages\pandas-0.7.0rc1-py2.7-win32.egg\pandas\core\frame.py", line 1238, in irow
return self.xs(label)
File "C:\Python27\lib\site-packages\pandas-0.7.0rc1-py2.7-win32.egg\pandas\core\frame.py", line 1498, in xs
loc = self.index.get_loc(key)
File "C:\Python27\lib\site-packages\pandas-0.7.0rc1-py2.7-win32.egg\pandas\core\index.py", line 478, in get_loc
return self._engine.get_loc(key)
File "engines.pyx", line 100, in pandas._engines.DictIndexEngine.get_loc (pandas\src\engines.c:2497)
File "engines.pyx", line 102, in pandas._engines.DictIndexEngine.get_loc (pandas\src\engines.c:2409)
TypeError