-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
Closed
Labels
API DesignEnhancementIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesMultiIndex
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 be None, plain Index objects should only accept None, 0, and, Index.name for the sake of consistency (the last one is especially arguable).
Metadata
Metadata
Assignees
Labels
API DesignEnhancementIndexingRelated to indexing on series/frames, not to indexes themselvesRelated to indexing on series/frames, not to indexes themselvesMultiIndex