-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DOC: fix doc for crosstab with Categorical data input #33783
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
Thanks for the PR. Looks like there are some minor fixes:
|
Hi, whether I need to close this pull and create another? Thanks, this is my first PR, not very sophisticated about the process. |
Oh, I find it start automatically after the push step. Thanks! |
Thanks @GYHHAHA ! Could you please include a screenshot of this part of the docs? See building the documentation If you're in the python make.py clean
python make.py --single user_guide/reshaping.rst |
Hi, this is the screenshot. Is it OK? Thanks! @MarcoGorelli |
|
||
.. ipython:: python | ||
|
||
foo = pd.Categorical(['a', 'b'], categories=['a', 'b', 'c']) | ||
bar = pd.Categorical(['d', 'e'], categories=['d', 'e', 'f']) | ||
pd.crosstab(foo, bar) | ||
pd.crosstab(foo, bar, dropna=False) |
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 u put this one in a separate ipython block and put the comment before that one
Hi, this is the screenshot under current status. Thanks for review! @jreback |
lgtm long on green |
Checks are down, is it ok? Thanks! @jreback |
thanks |
* fix doc for crosstab with Categorical data input * fix doc for crosstab with Categorical data input * put dropna=False in a separate ipython block
Crosstab function should set dropna=False to keep the categories which not appear in the data, but in the DOC, it seems to be inconsistent with the description. Two examples for comparison may be better for users to get this point.
https://pandas.pydata.org/docs/dev/user_guide/reshaping.html#cross-tabulations