-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
TST: Add regression tests for old issues #41389
Conversation
mroeschke
commented
May 9, 2021
- closes Regression in casting Series to DataFrame with .name='foo' and columns=['bar'] #7893
- closes BUG: loc.__setitem__ over MultiIndex with slice key and step != 1 does strange things #8856
- closes BUG: concat of all-nan with empty frame produces object dtype #9188
- closes BUG: NaN level values in stack() and unstack() #9406
- closes Aligning on multi-index with swapped levels gives unclear error message #9952
- closes Dataframe Where Dataframe == False Returns Dataframe with Floats #10336
- closes Indexing a multi-index does not respect order of list indexer #10710
- closes BUG: reset_index of level on a MultiIndex with NaT converts to np.nan #11479
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mroeschke lgtm
# GH 7893 | ||
result = DataFrame(Series(1, name="foo"), columns=["bar"]) | ||
expected = DataFrame(columns=["bar"]) | ||
tm.assert_frame_equal(result, expected) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this strikes me as weird. if the series's name was "bar", then result would have length 1 instead of 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm not sure; just seems it was the preferred behavior from #7893 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @jreback as you had mentioned that this behavior was expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah we should prob deprecate this but its the current behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @mroeschke
# GH 7893 | ||
result = DataFrame(Series(1, name="foo"), columns=["bar"]) | ||
expected = DataFrame(columns=["bar"]) | ||
tm.assert_frame_equal(result, expected) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah we should prob deprecate this but its the current behavior