-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: unstack fails for mixed dtype subset #7462
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
Conversation
@jreback ok with this? |
weird that works - |
there might be a better way to fix it ... i'll look a little deeper |
this way makes more sense, since we want the result of an unstack op to return the requested levels taking into account the labels ... before this fix, wasn't doing that if the unstack index result was a single level (coming from a multiindex) |
do u have an indexer? this is better done with take (though what u r doing should work if the level is unique I think) |
if i understand what you mean by indexer then yes |
@jreback this ok? the length check is really only for the one case ... feels a bit strange, but i couldn't see another place to put the fix ... welcome a suggestion |
you can't just use |
let me see if i can come up with a test for that last case |
I guess it's fine though maybe could add some tests to try to break it |
looks ok...squash and merge |
i'm not totally sure this is the best way to go about this .. i'll spend some time this weekend trying to break my impl |
@cpcloud status? |
was originally closed by #9292 |
closes #7405