-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Series.reset_index() should support "names" argument just like DataFrame.reset_index() does #55225
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
Comments
take |
My understanding of the issue:
Series:
DataFrame:
Some thoughts:
|
I don't know if I see a problem of "alignment"... they are just two different things, with different names (no pun intended!). My suggestion is to add As to implementation:
... i guess I would just copy the implementation in |
@toobaz I see what you mean. On second thought I'm not really sure why we have the |
They are to my eyes two different things, I can't understand how or why to "replace" one with the other. (This said, on the (unrelated to this issue) idea of removing |
I understand that they are different. I don't think that we should keep both because it will be confusing to have 2 similarly named params that do different things in the same function. Maybe instead of adding a param called |
[notice I'm suggesting to add
We could find another name for the parameter, but it should definitely be the same as in As for the options, But this said, if we need to have the deprecation cycle anyway, maybe I'm not anymore so strongly against just suppressing |
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
often comes handy. The same would hold for
... except it raises a
TypeError
Feature Description
Just implement
names
inSeries.reset_index
as it is implemented inDataFrame.reset_index
.Alternative Solutions
None I can think of_.
Additional Context
I suspect this was not done in the first place because discussion in #6878 considered
pd.Series.reset_index
to already have thename
argument... which however does something different (renaming the former values, not the former index).The text was updated successfully, but these errors were encountered: