-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
DEPR: allowing unknowns in take #52981
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.