From d64f8e6a33a8845db2d6e53f654e38533bcbd973 Mon Sep 17 00:00:00 2001 From: Terji Petersen Date: Tue, 13 Dec 2022 17:03:00 +0000 Subject: [PATCH] CLN: Remove Index._is_numeric_dtype --- pandas/core/indexes/base.py | 1 - pandas/core/indexes/datetimelike.py | 1 - pandas/core/indexes/numeric.py | 1 - 3 files changed, 3 deletions(-) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 7b8ba79789f41..d8e48a755ab26 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -387,7 +387,6 @@ def _outer_indexer( _no_setting_name: bool = False _comparables: list[str] = ["name"] _attributes: list[str] = ["name"] - _is_numeric_dtype: bool = False _can_hold_strings: bool = True # Whether this index is a NumericIndex, but not a Int64Index, Float64Index, diff --git a/pandas/core/indexes/datetimelike.py b/pandas/core/indexes/datetimelike.py index afe84befb6b31..1119b6e3b83ad 100644 --- a/pandas/core/indexes/datetimelike.py +++ b/pandas/core/indexes/datetimelike.py @@ -88,7 +88,6 @@ class DatetimeIndexOpsMixin(NDArrayBackedExtensionIndex): Common ops mixin to support a unified interface datetimelike Index. """ - _is_numeric_dtype = False _can_hold_strings = False _data: DatetimeArray | TimedeltaArray | PeriodArray freq: BaseOffset | None diff --git a/pandas/core/indexes/numeric.py b/pandas/core/indexes/numeric.py index 328e3d2f401e6..7af66f97a8cf7 100644 --- a/pandas/core/indexes/numeric.py +++ b/pandas/core/indexes/numeric.py @@ -86,7 +86,6 @@ class NumericIndex(Index): is_numeric_dtype, "numeric type", ) - _is_numeric_dtype = True _can_hold_strings = False _is_backward_compat_public_numeric_index: bool = True