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 I run DataFrame.reset_index and transform the index to a new column this way (using drop=False) the new column seems to be hardcoded to be called 'index'. But I want it to be named like 'MyTable_ID'. I suggest DataFrame.reset_index has an optional parameter column_name with the default value 'index'.
API breaking implications
The proposed change introduces a new optional parameter and is fully backwards compatible.
Describe alternatives you've considered
Can simply use df.rename('index', 'MyTable_ID', inplace=True) as a workaround.
Additional context
May need some extra care when dealing with multiindex.
The text was updated successfully, but these errors were encountered:
Describe the solution you'd like
When I run DataFrame.reset_index and transform the index to a new column this way (using drop=False) the new column seems to be hardcoded to be called 'index'. But I want it to be named like 'MyTable_ID'. I suggest DataFrame.reset_index has an optional parameter column_name with the default value 'index'.
API breaking implications
The proposed change introduces a new optional parameter and is fully backwards compatible.
Describe alternatives you've considered
Can simply use df.rename('index', 'MyTable_ID', inplace=True) as a workaround.
Additional context
May need some extra care when dealing with multiindex.
The text was updated successfully, but these errors were encountered: