Skip to content

Conversation

jreback
Copy link
Contributor

@jreback jreback commented May 20, 2014

reported on ML: https://groups.google.com/forum/#!topic/pydata/OscVmQlNdTc

In [1]: p = Panel(np.random.rand(4,3,2), items=['A','B','C','D'], major_axis=['U','V','W'], minor_axis=['X','Y'])

In [2]: p
Out[2]: 
<class 'pandas.core.panel.Panel'>
Dimensions: 4 (items) x 3 (major_axis) x 2 (minor_axis)
Items axis: A to D
Major_axis axis: U to W
Minor_axis axis: X to Y

In [3]: p['A']
Out[3]: 
          X         Y
U  0.541463  0.546778
V  0.079211  0.229914
W  0.621594  0.973252

In [4]: p.iloc[0,:,:]
Out[4]: 
          X         Y
U  0.541463  0.546778
V  0.079211  0.229914
W  0.621594  0.973252

In [5]: p.iloc[0,[True,True,True],:]
Out[5]: 
          X         Y
U  0.541463  0.546778
V  0.079211  0.229914
W  0.621594  0.973252

In [6]: p.iloc[0,[True,True,True],[0,1]]
Out[6]: 
          X         Y
U  0.541463  0.546778
V  0.079211  0.229914
W  0.621594  0.973252

In [7]: p.iloc[0,[True,True,True],[0,1,2]]
IndexError: positional indexers are out-of-bounds

In [8]: p.iloc[0,[True,True,True],[2]]
IndexError: positional indexers are out-of-bounds

@jreback jreback added this to the 0.14.0 milestone May 20, 2014
jreback added a commit that referenced this pull request May 21, 2014
BUG: bug in recognizing out-of-bounds on iloc indexers on tuple indexers (GH )
@jreback jreback merged commit 9d01fe1 into pandas-dev:master May 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error Reporting Incorrect or improved errors from pandas Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant