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: Panel indexing with partial setting #10839

Closed
jreback opened this issue Aug 18, 2015 · 6 comments
Closed

BUG: Panel indexing with partial setting #10839

jreback opened this issue Aug 18, 2015 · 6 comments
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves MultiIndex

Comments

@jreback
Copy link
Contributor

jreback commented Aug 18, 2015

xref #10360 / #10838

takes care of full slices, e.g. p.iloc[0,0,:] = [1,2,3], but the following is still failing
(whether mixed blocks or not)

In [8]: axes = dict(items = pd.MultiIndex.from_tuples([('A','a'), ('B','b')]), major_axis = pd.MultiIndex.from_tuples([('A',1),('A',2)]), minor_axis=pd.MultiIndex.from_product([['X'],range(3)]))

In [9]: p = Panel(0., **axes)


In [11]: p
Out[11]: 
<class 'pandas.core.panel.Panel'>
Dimensions: 2 (items) x 2 (major_axis) x 3 (minor_axis)
Items axis: (A, a) to (B, b)
Major_axis axis: (A, 1) to (A, 2)
Minor_axis axis: (X, 0) to (X, 2)

In [13]: p.iloc[0,0,1:3]
Out[13]: 
X  1    0
   2    0
Name: (A, 1), dtype: float64

In [14]: p.iloc[0,0,1:3] = [1,2]
IndexError: tuple index out of range
@jreback jreback added Bug Indexing Related to indexing on series/frames, not to indexes themselves MultiIndex labels Aug 18, 2015
@jreback jreback added this to the Next Major Release milestone Aug 18, 2015
@jreback
Copy link
Contributor Author

jreback commented Aug 18, 2015

cc @seth-p

what would be really helpful is some more comprehensive testing to find the edge cases with panel (I added some but things take different paths so need to hit them all)

@seth-p
Copy link
Contributor

seth-p commented Mar 17, 2016

The example in #10360 (comment) is still broken as of Pandas 0.18.0.

@jreback
Copy link
Contributor Author

jreback commented Mar 17, 2016

it's still an open issue

@jreback
Copy link
Contributor Author

jreback commented Mar 17, 2016

you might find xarray more convenient for representing nd data FYI

@seth-p
Copy link
Contributor

seth-p commented Mar 17, 2016

I looked briefly at xarray, and I like it, but I'm not ready to abandon Panels quite yet...

@jreback jreback modified the milestones: 0.18.1, Next Major Release Mar 17, 2016
@jreback jreback modified the milestones: Next Major Release, 0.18.1 Apr 26, 2016
@jreback
Copy link
Contributor Author

jreback commented Jul 10, 2017

closing as Panels are deprecated

@jreback jreback closed this as completed Jul 10, 2017
@jreback jreback modified the milestones: Next Major Release, won't fix Jul 11, 2017
@TomAugspurger TomAugspurger modified the milestones: won't fix, No action Jul 6, 2018
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 MultiIndex
Projects
None yet
Development

No branches or pull requests

4 participants