Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: indexing with an entire period_index raising #4125

Closed
jreback opened this issue Jul 4, 2013 · 1 comment
Closed

BUG: indexing with an entire period_index raising #4125

jreback opened this issue Jul 4, 2013 · 1 comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves Period Period data type
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Jul 4, 2013

In [57]: pi = pd.period_range('2002-01','2003-12',freq='M')

In [58]: pi
Out[58]: 
<class 'pandas.tseries.period.PeriodIndex'>
freq: M
[2002-01, ..., 2003-12]
length: 24

In [59]: p = pd.Panel(randn(24,5,10),items=pi)

In [60]: p
Out[60]: 
<class 'pandas.core.panel.Panel'>
Dimensions: 24 (items) x 5 (major_axis) x 10 (minor_axis)
Items axis: 2002-01 to 2003-12
Major_axis axis: 0 to 4
Minor_axis axis: 0 to 9

This is ok

In [61]: p.ix[list(pi)]
Out[61]: 
<class 'pandas.core.panel.Panel'>
Dimensions: 24 (items) x 5 (major_axis) x 10 (minor_axis)
Items axis: 2002-01 to 2003-12
Major_axis axis: 0 to 4
Minor_axis axis: 0 to 9

This raises?

In [62]: p.ix[pi]
DateParseError: day is out of range for month
@jreback jreback added the Period label Feb 26, 2014
@jreback jreback modified the milestones: 0.15.0, 0.14.0 Feb 26, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 3, 2015
@jreback jreback modified the milestones: 0.17.0, Next Major Release Sep 7, 2015
jreback added a commit that referenced this issue Sep 9, 2015
@jreback
Copy link
Contributor Author

jreback commented Sep 9, 2015

closed by #11015

@jreback jreback closed this as completed Sep 9, 2015
nickeubank pushed a commit to nickeubank/pandas that referenced this issue Sep 29, 2015
nickeubank pushed a commit to nickeubank/pandas that referenced this issue Sep 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves Period Period data type
Projects
None yet
Development

No branches or pull requests

1 participant