I'd like to compare a value of a MultiIndex to the whole index, to get a boolean array for other processing. This works fine for a regular integer index, but for some reason it doesn't compare equal for MultiIndex.
For example:
>>> i = pd.Index([1, 2, 3, 4, 5])
>>> i == i[0]
array([ True, False, False, False, False])
>>> i = pd.Index([(1, 2), (3, 2), (3, 3), (4, 1), (5, 2)])
>>> i == i[0]
array([False, False, False, False, False])
How can I achieve this comparison? I'm sure it is doable with looping through the index, but there's got to be a better way.