-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
API: Index should support __inverse__ ops #8875
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
maybe index should allow |
need to define |
np.array
?__inverse__
ops
OK. Changed the title. Currently
|
Actually, I think That said, it's probably a good idea to support |
__inverse__
ops
OK. Then prepare 2 separate fixes:
|
This look to work on master now. Could use a test for the
|
see #8875 (comment) Index.duplicated() has been changed to return an array, but the other part of the issue is to add _inverse_ to Index. This has not yet been done.
|
take |
__inverse__
to Index.Related to #7979
Because
Index
is no more the subclass ofnp.array
,Index.duplicated
returnsIndex
withdtype=object
. AndIndex
don't accepts logical not.As a result, it is impossible to drop data which have duplicated index using expression like
df[~df.index.duplicated()]
. This expression was worked at the timing of #7979.Does
Index.duplicated
should returnnp.array
withdtype=bool
? OrIndex
should accept logical not?The text was updated successfully, but these errors were encountered: