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

Unstacking boolean DataFrame fills 'True' for missing values #1820

Closed
warrenwjackson opened this issue Aug 28, 2012 · 1 comment
Closed

Unstacking boolean DataFrame fills 'True' for missing values #1820

warrenwjackson opened this issue Aug 28, 2012 · 1 comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Milestone

Comments

@warrenwjackson
Copy link

Is this a bug? If this is intentional, it is pretty dangerous to fill missing values with True.

>>> df = pd.DataFrame([False, False], index=pd.MultiIndex.from_arrays([['a', 'b'], ['c', 'l']]), columns=['col'])
>>> df
       col
a c  False
b l  False
>>> df.unstack()
     col
       c      l
a  False   True
b   True  False
@changhiskhan
Copy link
Contributor

Unstack now converts bool dtype to object dtype

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

No branches or pull requests

2 participants