Skip to content

Commit e16af22

Browse files
authored
CLN: remove _has_complex_internals (#43533)
1 parent 044ab26 commit e16af22

File tree

5 files changed

+0
-26
lines changed

5 files changed

+0
-26
lines changed

pandas/core/groupby/generic.py

-3
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,6 @@ def _aggregate_named(self, func, *args, **kwargs):
435435
initialized = False
436436

437437
for name, group in self:
438-
# Each step of this loop corresponds to
439-
# libreduction._BaseGrouper._apply_to_group
440-
# NB: libreduction does not pin name
441438
object.__setattr__(group, "name", name)
442439

443440
output = func(group, *args, **kwargs)

pandas/core/indexes/base.py

-8
Original file line numberDiff line numberDiff line change
@@ -4696,14 +4696,6 @@ def _require_scalar(self, value):
46964696
raise TypeError(f"'value' must be a scalar, passed: {type(value).__name__}")
46974697
return value
46984698

4699-
@property
4700-
def _has_complex_internals(self) -> bool:
4701-
"""
4702-
Indicates if an index is not directly backed by a numpy array
4703-
"""
4704-
# used to avoid libreduction code paths, which raise or require conversion
4705-
return False
4706-
47074699
def _is_memory_usage_qualified(self) -> bool:
47084700
"""
47094701
Return a boolean if we need a qualified .info display.

pandas/core/indexes/datetimelike.py

-5
Original file line numberDiff line numberDiff line change
@@ -548,11 +548,6 @@ def _with_freq(self, freq):
548548
arr = self._data._with_freq(freq)
549549
return type(self)._simple_new(arr, name=self._name)
550550

551-
@property
552-
def _has_complex_internals(self) -> bool:
553-
# used to avoid libreduction code paths, which raise or require conversion
554-
return True
555-
556551
def is_type_compatible(self, kind: str) -> bool:
557552
warnings.warn(
558553
f"{type(self).__name__}.is_type_compatible is deprecated and will be "

pandas/core/indexes/extension.py

-5
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,6 @@ def _simple_new(
308308
__truediv__ = _make_wrapped_arith_op("__truediv__")
309309
__rtruediv__ = _make_wrapped_arith_op("__rtruediv__")
310310

311-
@property
312-
def _has_complex_internals(self) -> bool:
313-
# used to avoid libreduction code paths, which raise or require conversion
314-
return True
315-
316311
# ---------------------------------------------------------------------
317312
# NDarray-Like Methods
318313

pandas/core/indexes/multi.py

-5
Original file line numberDiff line numberDiff line change
@@ -1543,11 +1543,6 @@ def _get_level_number(self, level) -> int:
15431543
) from err
15441544
return level
15451545

1546-
@property
1547-
def _has_complex_internals(self) -> bool:
1548-
# used to avoid libreduction code paths, which raise or require conversion
1549-
return True
1550-
15511546
@cache_readonly
15521547
def is_monotonic_increasing(self) -> bool:
15531548
"""

0 commit comments

Comments
 (0)