def restrictGender(mp, category, gender):
    """ Selects the minimal pairs that have a given gender
    For example, allows one to only keep pairs with masculine entries """
    dropouts_1 = list(mp.loc[(mp.cgram_1 == category) & (~mp.genre_1.str.contains(gender,na=True))].index)
    dropouts_2 = list(mp.loc[(mp.cgram_2 == category) & (~mp.genre_2.str.contains(gender,na=True))].index)
    pairs = mp.drop(list(set(dropouts_1 + dropouts_2)))
    return pairs