import numpy as np
import pandas
idx = pandas.MultiIndex.from_tuples([('a', letter) for letter in list('abcde')]
    )
df1 = pandas.DataFrame(np.random.normal(size=(5, 2)), index=idx, columns=[
    'colA', 'colB'])
df1.index.names = ['iA', 'iB']
df1 = df1.append(df1.select(lambda idx: idx[1] in ['c', 'e']))
df1
Удалить строки с повторяющимися индексами (Pandas DataFrame и TimeSeries)