-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPR: allowing unknowns in take #52981
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
Conversation
What's the motivation for this change? |
is_array_like is an antipattern #52834 |
Seems pretty heavy to deprecate this usage just to avoid |
That's a reasonable intuition, but np.asarray can have weird behaviors which we generally work around (but unfortunately have several slightly-different implementations of). My thought is to avoid that by just having the user do that casting. |
But we'll still allow e.g. a list in DataFrame.take and others? This seems inconsistent. |
This is for the first arg in take, not the indices. |
I personally wouldn't expect pandas to implement taking from a general sequence (e.g. a list); I'm okay with deprecating from that perspective. |
@mroeschke gentle ping on this and #52986 |
Thanks @jbrockmendel |
* DEPR: allowing unknowns in take * GH ref
* DEPR: allowing unknowns in take * GH ref
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.