We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6a8c41 commit bca5ae8Copy full SHA for bca5ae8
pandas/core/indexes/category.py
@@ -326,7 +326,7 @@ def __contains__(self, key):
326
hash(key)
327
328
if isna(key): # if key is a NaN, check if any NaN is in self.
329
- return self.isna().any()
+ return self.hasnans
330
331
# is key in self.categories? Then get its location.
332
# If not (i.e. KeyError), it logically can't be in self either
0 commit comments