Skip to content

Commit 2307d22

Browse files
committed
1 parent f7f266c commit 2307d22

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/core/indexes/base.py

+3
Original file line numberDiff line numberDiff line change
@@ -1949,6 +1949,9 @@ def __nonzero__(self):
19491949
def __contains__(self, key):
19501950
hash(key)
19511951
try:
1952+
if type(key) == float and self.dtype == int:
1953+
if key != int(key):
1954+
return False
19521955
return key in self._engine
19531956
except (OverflowError, TypeError, ValueError):
19541957
return False

0 commit comments

Comments
 (0)