We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c60ac19 commit cd03c1fCopy full SHA for cd03c1f
pandas/core/indexes/base.py
@@ -5525,8 +5525,7 @@ def _should_fallback_to_positional(self) -> bool:
5525
if is_integer_dtype(self):
5526
return False
5527
elif is_object_dtype(self):
5528
- inferred_dtype = lib.infer_dtype(self._values, skipna=False)
5529
- return inferred_dtype not in ["integer", "mixed-integer"]
+ return self.inferred_type not in ["integer", "mixed-integer"]
5530
else:
5531
return True
5532
0 commit comments