8000 ENH: allow index to be referenced by name by hsharrison · Pull Request #12404 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

ENH: allow index to be referenced by name #12404

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

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
missed a spot
  • Loading branch information
hsharrison committed Feb 21, 2016
commit 6db4f4b18ba21d61cfa301ba2fe1665c4749316e
6 changes: 1 addition & 5 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2633,11 +2633,7 @@ def __getattr__(self, name):
if (name in self._internal_names_set or name in self._metadata or
name in self._accessors):
return object.__getattribute__(self, name)
elif (
name in self._info_axis or
name == self.index.name or
(isinstance(self.index, MultiIndex) and name in self.index.names)
):
elif name in self._info_axis or name in self.index.names:
return self[name]
return object.__getattribute__(self, name)

Expand Down
0