Skip to content

Panel.apply fails when one of the axes is a Multi-Indexed DataFrame #7469

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

Closed
colindickson opened this issue Jun 16, 2014 · 4 comments · Fixed by #7474
Closed

Panel.apply fails when one of the axes is a Multi-Indexed DataFrame #7469

colindickson opened this issue Jun 16, 2014 · 4 comments · Fixed by #7474
Labels
Bug MultiIndex Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Milestone

Comments

@colindickson
Copy link

Wrote up an example notebook:

http://nbviewer.ipython.org/urls/gist.githubusercontent.com/colindickson/850d3b5172f0320f204a/raw/62e4dfd450964326b8e3c2635c5c3f4c098a7352/panel.ipynb

@colindickson colindickson changed the title Panel.apply fails when one of the axes is is a Multi-Indexed DataFrame Panel.apply fails when one of the axes is a Multi-Indexed DataFrame Jun 16, 2014
@jreback
Copy link
Contributor

jreback commented Jun 16, 2014

hmm not really tested with multi index axes for panel - so a bug

what are u trying to do by unstacking?

maybe show what u want as an end result

@colindickson
Copy link
Author

what i was orignally trying to do, was trying to do the equivalent of reconstructing a new panel with the unstacked dataframes.

i've updated the notebook in the top post.

thanks!

@jreback
Copy link
Contributor

jreback commented Jun 16, 2014

I fixed the bug in #7474, but I don't think you should be doing an unstack in an apply. nothing wrong with your soln.

@colindickson
Copy link
Author

applying an unstack to an axis of a panel would seem to me like a natural extension of the kinds of things i'm used to applying to dataframes. i'll have to experiment around once i get the version with the bugfix. thanks for fixing it! cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug MultiIndex Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants