-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
DOC: CategoricalDtype
equality semantics aren't completely described
#57259
Comments
Thanks for the report.
Though both empty, two arrays of different dtypes are not the same. I suppose "including their dtypes" would be okay to add. |
take |
thanks @rhshadrach ! |
@Mehnaz02 # when
a.categories.dtype
# is different from:
b.categories.dtype (btw, in the latest pandas version |
I can try starting to fix it, but definitely much later.. |
I disagree with this assessment. I believe one just needs to modify the documentation to state that the categories must be the equal as indexes, and that in particular includes their dtype. Am I missing something? In addition, all PRs are reviewed, and so help can be given as part of that review. |
As a regular contributor with little experience in the pandas community, I've observed that the label 'good first issue' extends beyond mere simplicity in solving a problem. Typically, it's assigned to documentation-related tasks, serving as a helpful starting point for newcomers eager to engage with the community. However, this doesn't diminish the significance of documentation enhancements in the community's eyes. Every pull request, regardless of its nature, undergoes review and suggestions. Nevertheless, complex documentation improvements might demand more effort from reviewers, particularly as they often originate from contributors unfamiliar with the pandas community.
In issues #57273 and #57281, I believe @VladimirFokow intended to convey that not only this specific aspect of the documentation, but the documentation as a whole, seems somewhat perplexing to him. |
thank you so much @luke396 !! |
Hey, I hope you're doing well team. |
Hello @eaedk ! |
Hello @VladimirFokow, oh I thought it was solved. |
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/user_guide/categorical.html#equality-semantics
https://github.com/pandas-dev/pandas/blob/main/pandas/core/dtypes/dtypes.py#L407
Documentation problem
Problematic statement 1:
Problematic statement 2:
Counter-example:
As we can see, they both have
ordered=False
, and theircategories
are same.Following the documentation, they should be equal.
Suggested fix for documentation
to have accurate and exhaustive descriptions
The text was updated successfully, but these errors were encountered: