def remove_duplicate_index(df):
    """Remove all entries in a data frame that have a duplicate index.

    :param df: DataFrame containing duplicate indicies.
    :returns: DataFrame with the duplicates removed
    """
    index_name = df.index.name
    md = df.reset_index()
    md.drop_duplicates(index_name, inplace=True)
    md.set_index(index_name, inplace=True)
    return md