-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Add informal definition of "label" in note #27005
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
The term "label" is used extenisively, but (AFAICT) it is never explained what a "label" is. Is an integer offset a label? Do labels apply to rows and columns, multi-indexes? What's the relation between an "index" "axis" and "label" ... etc.
Codecov Report
@@ Coverage Diff @@
## master #27005 +/- ##
==========================================
- Coverage 91.99% 91.99% -0.01%
==========================================
Files 180 180
Lines 50774 50774
==========================================
- Hits 46712 46708 -4
- Misses 4062 4066 +4
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #27005 +/- ##
==========================================
- Coverage 91.99% 91.99% -0.01%
==========================================
Files 180 180
Lines 50774 50774
==========================================
- Hits 46712 46708 -4
- Misses 4062 4066 +4
Continue to review full report at Codecov.
|
I find this note a little confusing. Would just mentioning that a |
I agree. It is too verbose, and there is already too many notes and warnings (which I tend to have a habit of not reading anyway :)). I will re-word. |
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.
Hmm still not sure this is it but cc @datapythonista in case he has any insight to offer
@@ -6,17 +6,18 @@ | |||
Indexing and Selecting Data | |||
*************************** | |||
|
|||
The axis labeling information in pandas objects serves many purposes: | |||
In pandas, data structure axes such as the rows and columns of a DataFrame may have |
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.
To be clear, an Index (which is used for selection along an axis) does have labels. This is a main thing that separates pandas from libraries like NumPy
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.
Yes I know. It's actually quite challenging to unpack axis, index, labels, positional indexation via integers in a sentence or two. An index really is labels. I found it an improvement over "axis labeling information ... serves many purposes", by being less nebulous and vague.
I agree that we should be more explicit on the terms we used. I think we discussed in the past about having a glossary, which I think it's the right way to address this. I could only find this related issue: #21784 I don't think this PR is helping much. I'll close this, and open an issue for the glossary, feel free to work on that. |
Sounds good. May be loosely intertwined with what we are defining in pandas._typing @sam-at-github thanks for the PR. To the point above though I think we'd rather make a more comprehensive change than what is offered here. Would certainly value input if you'd like to put thoughts into the other issue |
Sorry, re-reading my last comment, just realized that probably didn't sound really nice... Not my intention. @sam-at-github thanks for your contribution, and it really helps, since this is very helpful feedback. I opened #27019 since I think a glossary will make it easier to address what you're addressing here. Feel free to continue the work you started here, but I think it makes more sense to close this, and continue in a PR that addresses that issue. Thanks! |
Sounds like perfect is the enemy of the good around here. Good luck with glossary. |
The term "label" is used extenisively, but (AFAICT) it is never explained what a "label" is. Is an integer offset a label? Do labels apply to rows and columns, multi-indexes? What's the relation between an "index" "axis" and "label" ... etc.
git diff upstream/master -u -- "*.py" | flake8 --diff