You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When resetting the index of a DataFrame, and when needing to rename the "index" column to something more useful, it would be nice to do it directly with the call toreset_index (and not afterwards with df.rename).
Describe the solution you'd like
DataFrame.reset_index should get a new parameter name that renames the "index" column after resetting.
API breaking implications
I don't see any obvious implications.
The text was updated successfully, but these errors were encountered:
I think that would be a good idea, see #6878 (I think we can close this as a duplicate).
The main problem is that Series.reset_index already has a name keyword but that is used for the values column name, not index column name (so we will probably need another keyword name for this, unfortunately)
Is your feature request related to a problem?
When resetting the index of a
DataFrame
, and when needing to rename the "index" column to something more useful, it would be nice to do it directly with the call toreset_index
(and not afterwards withdf.rename
).Describe the solution you'd like
DataFrame.reset_index
should get a new parametername
that renames the "index" column after resetting.API breaking implications
I don't see any obvious implications.
The text was updated successfully, but these errors were encountered: