-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Discussion: Should reindex keep the index name if new index has none #9885
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
There isn't an obvious answer to me for this one. Also keep in mind that we have |
I think We do technically associate the name of an index with the index itself, but from a practical perspective the name of an index is also strongly associated with the dataframe that contains it (somewhat similarly to the case for |
I'm developing an application which uses this feature. I came across page researching a bug in my application. I have used re_index to readjust on the fly to a function local Index variable which I did not bother to assign a name to. Reindex therefore dropped my index name and it broke down the line. I would suggest that the index name is preserved if:
and the index name is renamed if:
Perhaps an optional 'name_transform=None' argument could be added with the default behaviour as above and further 'drop' or 'keep' options to explicitly define the behaviour. |
Thanks for the issue but it appears there hasn't been much movement towards an action item here so closing. Happy to have a new issue with the discussion if there's interest |
As mentioned in #6552 there is an open question about whether reindex should keep the index name if the new index has no name.
Current Behavior:
Related Issues:
#9854
The text was updated successfully, but these errors were encountered: