Skip to content

add test for "Allow definition of pd.CategoricalDtype with a specific categories.dtype" #32115

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

Merged
merged 4 commits into from
Mar 2, 2020

Conversation

rushabh-v
Copy link
Contributor

@rushabh-v rushabh-v commented Feb 19, 2020

@pep8speaks
Copy link

pep8speaks commented Feb 19, 2020

Hello @rushabh-v! 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 2020-02-20 09:05:02 UTC

@rushabh-v
Copy link
Contributor Author

@TomAugspurger I have added the test. Where should I add the documentation?

@TomAugspurger
Copy link
Contributor

Probably in the CategoricalDtype docstring in dtypes/dtypes.py. Add a sentence to the categories parameter noting that the categories are stored in an Index, and that if an index is provided the dtype from it will be used. Then in the Examples section a sentence saying an empty categorical with a specific dtype can be created by providing an empty index, and then show the example.

@rushabh-v
Copy link
Contributor Author

rushabh-v commented Feb 20, 2020

can you take a look, please? @TomAugspurger

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Feb 20, 2020 via email

@simonjayhawkins simonjayhawkins added Categorical Categorical Data Type Docs labels Feb 20, 2020
@TomAugspurger TomAugspurger merged commit 8b347ea into pandas-dev:master Mar 2, 2020
@TomAugspurger
Copy link
Contributor

Thanks @rushabh-v!

@TomAugspurger TomAugspurger added this to the 1.1 milestone Mar 2, 2020
roberthdevries pushed a commit to roberthdevries/pandas that referenced this pull request Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Categorical Categorical Data Type Docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow definition of pd.CategoricalDtype with a specific categories.dtype
4 participants