Skip to content

Commit b1ac49f

Browse files
jorisvandenbosschefeefladder
authored andcommitted
CLN: remove unused Series._index attribute (pandas-dev#42955)
1 parent 4870b49 commit b1ac49f

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

pandas/core/generic.py

-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ class NDFrame(PandasObject, indexing.IndexingMixin):
211211
"_is_copy",
212212
"_subtyp",
213213
"_name",
214-
"_index",
215214
"_default_kind",
216215
"_default_fill_value",
217216
"_metadata",

pandas/core/series.py

-3
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,6 @@ def _constructor_expanddim(self) -> type[DataFrame]:
519519
def _can_hold_na(self) -> bool:
520520
return self._mgr._can_hold_na
521521

522-
_index: Index | None = None
523-
524522
def _set_axis(self, axis: int, labels, fastpath: bool = False) -> None:
525523
"""
526524
Override generic, we want to set the _typ here.
@@ -549,7 +547,6 @@ def _set_axis(self, axis: int, labels, fastpath: bool = False) -> None:
549547
# or not be a DatetimeIndex
550548
pass
551549

552-
object.__setattr__(self, "_index", labels)
553550
if not fastpath:
554551
# The ensure_index call above ensures we have an Index object
555552
self._mgr.set_axis(axis, labels)

0 commit comments

Comments
 (0)