8000
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 a0f30f6 commit 7ff5a04Copy full SHA for 7ff5a04
pandas/core/indexes/range.py
@@ -1121,13 +1121,8 @@ def take(
1121
raise TypeError("Expected indices to be array-like")
1122
indices = ensure_platform_int(indices)
1123
1124
- # If allow_fill=True and fill_value=None, just ignore allow_fill,
1125
- # without raising an exception, as it's done in the base class.
1126
- if allow_fill and fill_value is not None:
1127
- cls_name = type(self).__name__
1128
- raise ValueError(
1129
- f"Unable to fill values because {cls_name} cannot contain NA"
1130
- )
+ # allow_fill is not used, but raise an exception if it's True and fill_value is not None
+ self._maybe_disallow_fill(allow_fill, fill_value, indices)
1131
1132
if len(indices) == 0:
1133
taken = np.array([], dtype=self.dtype)
0 commit comments