-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DOC: update the Series.reset_index DocString #20107
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
Changes from 1 commit
0d97714
291b5c0
a45970e
4e70101
8f3ddb4
25d706a
a9a69d0
28974ac
1af336d
9a27e63
0604a3c
8b0cefd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1002,24 +1002,33 @@ def _set_value(self, label, value, takeable=False): | |
|
||
def reset_index(self, level=None, drop=False, name=None, inplace=False): | ||
""" | ||
Analogous to the :meth:`pandas.DataFrame.reset_index` function, see | ||
docstring there. | ||
Reset the index of the Serie. | ||
|
||
For a Serie with multi-level index, return a new Serie with labeling | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would start the explanation with the standard case of normal index |
||
information in the columns under the index names, defaulting to ‘level_0’, | ||
‘level_1’, etc. if any are None. For a standard index, | ||
the index name will be used (if set), otherwise a default | ||
‘index’ or ‘level_0’ (if ‘index’ is already taken) will be used. | ||
|
||
Parameters | ||
---------- | ||
level : int, str, tuple, or list, default None | ||
level : `int`, `str`, `tuple`, or `list`, default `None` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those quotes in the type description is not needed |
||
Only remove the given levels from the index. Removes all levels by | ||
default | ||
drop : boolean, default False | ||
Do not try to insert index into dataframe columns | ||
name : object, default None | ||
The name of the column corresponding to the Series values | ||
inplace : boolean, default False | ||
Modify the Series in place (do not create a new object) | ||
default. | ||
drop : `boolean`, default `False` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. boolean -> bool There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tnx |
||
Do not try to insert index into dataframe columns. | ||
name : `object`, default `None` | ||
The name of the column corresponding to the Series values. | ||
inplace : `boolean`, default `False` | ||
Modify the Series in place (do not create a new object). | ||
|
||
Returns | ||
---------- | ||
resetted : DataFrame, or Series if drop == True | ||
resetted : `DataFrame`, or Series if `drop == True` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resetted should probably just "reset" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok! |
||
|
||
See Also | ||
-------- | ||
:meth:`pandas.DataFrame.reset_index`: Analogous funciton for DataFrame | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. funciton -> function
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
Examples | ||
-------- | ||
|
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.
General comment: Serie -> Series (the singular of Series is still Series :))
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.
Solved tnx!
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.
Did you already push? Because this one is not yet fixed
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.
Sorry, I missed it!