Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork19.4k
Closed
Labels
Milestone
Description
xref#7886
It would be nice to be able to write:
s[s.index.isin(['a','b','c'],level='foo')]
instead of
s[s.index.get_level_values('foo').isin(['a','b','c'])]
The former variant is not only shorter but is also potentially more performant: one only has to look up levels in given container and then operate on labels only avoiding instantiation of sub-index completely.
Default value should beNone, plainIndex objects should only acceptNone,0, and,Index.name for the sake of consistency (the last one is especially arguable).