-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
DEPR: remove get_values, SparseArray.values #29989
Conversation
I would have thought these changes would have been fine...just need to diagnose the CI failures. |
stacklevel=2, | ||
) | ||
return self._internal_get_values() | ||
|
||
def _internal_get_values(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add part of the above docstring to this method? (the interesting parts for internal use, eg what it returns)
(and potentially the same comment for some of the other cases below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea
I think there is some JSON code that can get cleaned up as part of this:
|
Nice. Want me to do that here or save for follow-up? |
Up to you |
Let's do that here I would say, it's from the same PR that deprecated SparseArray.values: #26421 (you are already removing part of the things of that PR that can be removed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. ping when ready (if addressing JSON things)
pandas/core/generic.py
Outdated
@@ -5500,7 +5497,7 @@ def get_values(self): | |||
0 1 True 1.0 | |||
1 2 False 2.0 | |||
|
|||
>>> df.get_values() | |||
>>> df._internal_get_values() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would just remove these examples as they are no longer relevant
removed examples from docstring, left the json since it wasnt obvious what to do in the places where is_sparse_array is currently called |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
From looking at my old PR, I think you can just remove the |
removed is_sparse_array, green |
Thanks @jbrockmendel |
The cleanups in libreduction are made possible by SparseArray.values going away.