Skip to content

CLN: remove unused Series._index attribute #42955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ class NDFrame(PandasObject, indexing.IndexingMixin):
"_is_copy",
"_subtyp",
"_name",
"_index",
"_default_kind",
"_default_fill_value",
"_metadata",
Expand Down
3 changes: 0 additions & 3 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,6 @@ def _constructor_expanddim(self) -> type[DataFrame]:
def _can_hold_na(self) -> bool:
return self._mgr._can_hold_na

_index: Index | None = None

def _set_axis(self, axis: int, labels, fastpath: bool = False) -> None:
"""
Override generic, we want to set the _typ here.
Expand Down Expand Up @@ -549,7 +547,6 @@ def _set_axis(self, axis: int, labels, fastpath: bool = False) -> None:
# or not be a DatetimeIndex
pass

object.__setattr__(self, "_index", labels)
if not fastpath:
# The ensure_index call above ensures we have an Index object
self._mgr.set_axis(axis, labels)
Expand Down