-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Index name lost when using .loc with list of indices #8555
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
Comments
|
this works in master/0.15 (IIRC fixed for 0.14.1 as well), but don't remember off-hand try out the rc1 |
Never mind then. Thanks! |
This is a duplicate of #6552, should be fixed in 0.15. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using DataFrame.loc with a list of indices, the index name is missing from the resultant DataFrame unless the list of indices includes all of the indices in the original DataFrame.
Example:
When I use .loc and ask for all of the rows, I get (as desired) the correct, named index out the other end:
When I ask for a list of indices that is not all of them, I also expect to get a named index out the other end. However, the index values are preserved but the index name is lost:
Suggesting that this is a bug because the index naming should be the same no matter whether I
.loc
for for all of the rows or just some of them.The text was updated successfully, but these errors were encountered: