-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: Index.get_value ? #19728
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
iirc this is heavily used in indexing code |
But what needs to be fixed? If it is heavily used in indexing code, it is probably useful? |
no you are missing the point here. A lot of index methods are used internally to do indexing. But that does not necessarily mean they should be publicly exposed, though they are currently. If we are making first class extensions, then all methods should be public and pandas itself should not even internally rely on indexing methods (and if they do they would be private). So its public now, deprecating the current function just causes one more method and that is just smelly. If you want to deprecate it, then it should be completely removed from the internal API and just call public methods). |
I was not speaking about extensions here. |
I don't care if we have Index sub-classes in the wild. that's not my point. We should get rid of |
I don't think there are Index subclasses in the wild that rely on |
@shoyer But if |
If I recall correctly, |
Index.get_value
is a very strange (from user perspective), and completely undocumented method, so let's rename it to_get_value
for internal usage and deprecate the public one?Example usage to show its 'not-usefulness':
(so you can index into another object based on the location of the key in the calling index)
The text was updated successfully, but these errors were encountered: