df['Class'] = np.where(df['Class'].isin(['Individual','Group']), df['Class'], 'Other')