-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Test type issue fix in empty groupby from DataFrame with categorical #29355
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: Test type issue fix in empty groupby from DataFrame with categorical #29355
Conversation
pandas/tests/groupby/test_groupby.py
Outdated
@@ -1825,6 +1825,18 @@ def test_groupby_empty_list_raises(): | |||
df.groupby([[]]) | |||
|
|||
|
|||
def test_groupby_with_empty_category(): |
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.
can you move this to groupby/test_categorical.py
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.
Done, thanks!
pandas/tests/groupby/test_groupby.py
Outdated
# GH-9614 | ||
df = pd.DataFrame({"id": [None] * 3, "spam": [None] * 3}) | ||
df["spam"] = df["spam"].astype("category") | ||
df["spam"] == "spam" # works as 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.
can you assert this result here
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.
I've refactored to what I think is more clear & explicit.
Please approve fine or let me know more asserts still needed, thanks!
Hello @louishuynh! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2019-11-12 19:05:15 UTC |
480f76c
to
4b77aaa
Compare
thanks @louishuynh |
TST: Test type issue fix in empty groupby from DataFrame with categorical
closes #9614