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 dfb36b0 commit 2f42299Copy full SHA for 2f42299
pandas/core/indexes/base.py
@@ -5540,8 +5540,7 @@ def _should_fallback_to_positional(self) -> bool:
5540
if is_integer_dtype(self):
5541
return False
5542
elif is_object_dtype(self):
5543
- inferred_dtype = lib.infer_dtype(self._values, skipna=False)
5544
- return inferred_dtype not in ["integer", "mixed-integer"]
+ return self.inferred_type not in ["integer", "mixed-integer"]
5545
else:
5546
return True
5547
0 commit comments