-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Add tests for groupby categorical values with axis=1 #27788
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
Conversation
def test_groupby_categorical_axis_1(code): | ||
# GH 13420 | ||
df = DataFrame({"a": [1, 2, 3, 4], "b": [-1, -2, -3, -4], "c": [5, 6, 7, 8]}) | ||
grp = pd.Categorical.from_codes(code, categories=list("abc")) |
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 call this cat
instead of grp
? The latter is typically the result of an actual groupby
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.
ok, changed! @WillAyd and thanks for taking a look!
lgtm. @WillAyd |
Thanks @charlesdong1991 ! |
This is xref #27700 (comment)
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff