-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DOC: Document a few more methods for Categorical Array #56927
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
Comments
@lithomas1, I'm not totally familiar with the triage process, but wanted to check if these changes we something that pandas was interested in making. I assume because you removed the triage label, it is? |
Sorry - forgot to leave my comment! It looks like Categorical might be considered for deprecation (in this issue #55550). (Personally, though, I don't find the reasons in that issue that compelling, compared to the churn it would create). We should resolve that before we document more of Categorical. |
Thanks for getting back! What do you think of considering this separately?
On the other hand, if that conversation takes a while maybe this gets forgotten and the docs don't get improved. |
I haven't seen any support for the idea of deprecating pd.Categorical from the top namespace, no plans to push on the idea myself. I do think it has a bearing on #56874 since it would be necessary if we wanted to make EAs never-intended-to-be-used-directly-by-users |
To me, that issue reads more like a discussion about whether to publicly document extension array private methods like |
Uh oh!
There was an error while loading. Please reload this page.
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/reference/api/pandas.Categorical.html#pandas.Categorical
Documentation problem
The only documented methods for the
Categorical
class arefrom_codes
and__array__
. However a bunch of other methods exist and have docstrings written. These include:The above are just some of the methods which are specific to categorical. There are then also methods (with doc strings) like:
astype
,isin
,min
,max
,describe
, etc.Suggested fix for documentation
I think at least some of these should show up in the rendered docs. Maybe all, but that could also lead to crowded docs.
I see it has been suggested in the past that only selected methods are documented, but I'm not sure if a criteria has been established.
At a minimum, I would add all the categorical specific methods that I've listed above.
The text was updated successfully, but these errors were encountered: