Skip to content

DOC: index described as a "set" but permits duplicates -- change to multiset or list? #36170

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

Closed
notestaff opened this issue Sep 6, 2020 · 7 comments · Fixed by #36239
Closed

Comments

@notestaff
Copy link

Location of the documentation

https://pandas.pydata.org/pandas-docs/stable/reference/indexing.html

Documentation problem

Index is described as a "set", but behaves as a multiset: len() counts each occurrent of a duplicate element separately.

Also, Index is described as an "ordered set", but that term connotes a set with an order relation on the values of its elements.

Suggested fix for documentation

An index seems more like an immutable ordered list; maybe, describe it as that?

@notestaff notestaff added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 6, 2020
@dsaxton
Copy link
Member

dsaxton commented Sep 7, 2020

Thanks @notestaff, this does seem like an odd description. "Immutable ndarray implementing an ordered, sliceable set.", but it's neither an ndarray, ordered, or a set. A PR to update the docs would be helpful.

@dsaxton dsaxton added good first issue and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 7, 2020
@dsaxton dsaxton added this to the Contributions Welcome milestone Sep 7, 2020
@onshek
Copy link
Contributor

onshek commented Sep 8, 2020

I'm willing to take this.

@Nikhil1O1
Copy link
Contributor

i would be glad to make my first contribution here

@Nikhil1O1
Copy link
Contributor

take

@Nikhil1O1
Copy link
Contributor

There's no indexing.html present in my clone... However, I found \pandas\doc\source\reference\indexing.rst but
this is not what we are looking for
Please help me to pinpoint its location
@notestaff @dsaxton

@dsaxton
Copy link
Member

dsaxton commented Sep 8, 2020

@Nikhil1O1 It looks like the docs you'd want to update are in two places (this description is used for a few different classes): /pandas/core/indexes/base.py and /pandas/core/indexes/numeric.py

@Nikhil1O1
Copy link
Contributor

Done, If there's anything else I can do... Do let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants