__inverse__
to Index.Related to #7979
Because Index
is no more the subclass of np.array
, Index.duplicated
returns Index
with dtype=object
. And Index
don't accepts logical not.
idx = pd.Index([1, 2, 1, 3])
idx.duplicated()
# Index([False, False, True, False], dtype='object')
~idx.duplicated()
# TypeError: bad operand type for unary ~: 'Index'
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 return np.array
with dtype=bool
? Or Index
should accept logical not?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4