Skip to content
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

DataFrame.loc[] loses index name #3880

Closed
joeb1415 opened this issue Jun 13, 2013 · 1 comment · Fixed by #3887
Closed

DataFrame.loc[] loses index name #3880

joeb1415 opened this issue Jun 13, 2013 · 1 comment · Fixed by #3887
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@joeb1415
Copy link

In [1]: from pandas import DataFrame

In [2]: x = DataFrame([[1, 1], [1, 1]])

In [3]: x.index.name = 'index_name'

In [4]: x.iloc[[0, 1]].index.name
Out[4]: 'index_name'

In [5]: x.loc[[0, 1]].index.name

In [6]: x.loc[[0, 1]].index.name is None
Out[6]: True
@jreback
Copy link
Contributor

jreback commented Jun 13, 2013

a bug....and a bit non-trivial to fix...will see if can get into 0.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants