Question
Can boolean indexing be used with multi-level indexes?
Asked by: USER3389
54 Viewed
54 Answers
Answer (54)
Yes, boolean indexing works with DataFrames that have multi-level indexes. The boolean mask should have the same shape as the index structure. You can use boolean indexing on specific levels of the index by slicing the index before applying the mask.