Skip to content

fix loc on MultiIndex with slice #291

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 3 commits into from
Sep 12, 2022
Merged

Conversation

Dr-Irv
Copy link
Collaborator

@Dr-Irv Dr-Irv commented Sep 12, 2022

@Dr-Irv Dr-Irv requested a review from twoertwein September 12, 2022 01:26
@@ -140,7 +140,8 @@ class _LocIndexerFrame(_LocIndexer):
| MaskType
| slice
| list[HashableT]
| tuple[str | int | slice, ...],
| tuple[str | int | slice, ...]
| Hashable,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have Hashable here, we probably don't need tuple[...] and slice as they should also be hashable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, fixed in next commit.

@twoertwein twoertwein merged commit bed018c into pandas-dev:main Sep 12, 2022
@twoertwein
Copy link
Member

Thanks @Dr-Irv !

@Dr-Irv Dr-Irv deleted the locslice branch December 28, 2022 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataFrame.loc not accepting a slice argument with .loc
2 participants