-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Refactor numeric index docs #14985
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
Current coverage is 84.78% (diff: 100%)@@ master #14985 diff @@
==========================================
Files 145 145
Lines 51090 51107 +17
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 43315 43333 +18
+ Misses 7775 7774 -1
Partials 0 0
|
nit: needs a blank like before
|
bb4a9ac
to
26c5261
Compare
@jreback : Made the requested doc changes. Ready to merge if there are no other concerns. |
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.
+1 on sharing docstrings for public functions (eg the classes in this PR), but I am not sure we should also do this for private helper functions.
As the docstrings there are in the first place helpful for developers when looking and trying to understand the code. That the docstring is right there next to the function when looking at it in your IDE can be very helpful.
convert a scalar indexer | ||
|
||
_index_shared_docs['_convert_scalar_indexer'] = """ | ||
Convert a scalar indexer. | ||
Parameters |
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.
also a blank line missing above 'Parameters' here I think
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.
Good catch. Done.
by the DataFrame and Series ctors when no explicit index is provided by the | ||
user. | ||
storing axis labels for all pandas objects. %(klass)s is a special case | ||
of `Index` with purely integer labels. %(extra)s |
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.
"purely integer labels" -> will also be used for Float64Index?
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.
Good catch. Done.
@jorisvandenbossche : I think sharing docstrings across private functions is fine. I get more confused by the inconsistencies across written-out docstrings for the same functions, whether private or public. Not to mention, there are already numerous private functions in |
26c5261
to
ba80766
Compare
@jreback , @jorisvandenbossche : If there are no other concerns, I think this is good to merge. |
thanks! |
Refactor
NumericIndex
docs to avoid duplicate documentation. xref #14937.