hacer una declaración de condición en la columna pandas
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'