-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: pandas.DataFrame().stack() raise an error, while expected is empty #36113
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
Comments
Thanks for the report. I think the expected output should be an empty Series rather than an empty DataFrame. What do you think? |
@TomAugspurger |
Doesn't DataFrame.stack return a Series? Or do I misunderstand? |
From the code on
By default |
@TomAugspurger |
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Problem description
I expect that stack() of empty dataframe will be empty dataframe and not an exception
The text was updated successfully, but these errors were encountered: