-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Documentation for pandas.core.indexes.api #22980
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: Documentation for pandas.core.indexes.api #22980
Conversation
Hello @araraonline! Thanks for submitting the PR.
|
Codecov Report
@@ Coverage Diff @@
## master #22980 +/- ##
==========================================
+ Coverage 92.19% 92.19% +<.01%
==========================================
Files 169 169
Lines 50911 50922 +11
==========================================
+ Hits 46939 46950 +11
Misses 3972 3972
Continue to review full report at Codecov.
|
19df70c
to
e55f9b3
Compare
pandas/core/indexes/api.py
Outdated
|
||
Parameters | ||
---------- | ||
indexes: a list of Index or array-like objects |
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.
Actually, this should be 'a list of Index or list objects'
Will fix soon
e55f9b3
to
2e30318
Compare
context looks ok, @datapythonista or @jorisvandenbossche if you want to glance at the doc-strings; these are internal only |
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.
Looks good, it's nice to have docs in those functions.
Few comments about formatting that apply to all docstrings:
- Start he docstring in the next line of
"""
, not in the same - Missing space before colon in Parameters
param_name : type
- Missing period at the end of the parameter descriptions, and the returns description.
- Use Python types for parameter types (or returns), for example
bool
instead ofboolean
. And have just the type, for examplelist of bool
instead ofa list of bool
pandas/core/indexes/api.py
Outdated
|
||
- [list, list, ...]: Return ([list, list, ...], 'list') | ||
- [list, Index, ...]: Return _sanitize_and_check([Index, Index, ...]) | ||
Lists are sorted and converted to Index |
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.
Will add period to this too
pandas/core/indexes/api.py
Outdated
@@ -144,6 +229,21 @@ def _sanitize_and_check(indexes): | |||
|
|||
|
|||
def _get_consensus_names(indexes): | |||
""" | |||
Give a consensus 'names' to indexes, |
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.
my bad
e5a54da
to
62e7a3e
Compare
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.
Thanks for adding these docs, and sorry for the delay in reviewing.
The functions on pandas.core.indexes.api had almost no documentation. This is an attempt to explain them better and a progress towards #22915.