Passing a list to level param of unstack() unexpectedly changes dtype from numeric to object #9913
Labels
Dtype Conversions
Unexpected or buggy dtype conversions
Duplicate Report
Duplicate issue or pull request
MultiIndex
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
I experience these strange behavior of
unstack()
when itslevel
parameter gets a list instead of string.This changes
dtype
of some columns from numeric to object, which is obviously a worrying change.I am wondering if this a bug or there is something I am missing about dealing with this.
I am on pandas 0.16.0, numpy 1.9.2.
Here is a code to illustrate the problem:
Which produces:
The text was updated successfully, but these errors were encountered: