# Many of the MultiIndex slicing operations will fail if the index is not sorted. # The multiindex is not sorted lexographically.
pd.MultiIndex.from_arrays([['a', 'a', 'b', 'b'], [1, 2, 1, 2]]) pd.MultiIndex.from_tuples([('a', 1), ('a', 2), ('b', 1), ('b', 2)]) pd.MultiIndex.from_product([['a ...