Сделайте утверждение условия на пандах столбца
df['color'] = ['red' if x == 'Z' else 'green' for x in df['Set']]
Fragile Finch
df['color'] = ['red' if x == 'Z' else 'green' for x in df['Set']]
df.loc[df['column name'] condition, 'new column name'] = 'value if condition is met'