Wenden Sie Lambda mit if an
df['new column name'] = df['column name'].apply(lambda x: 'value if condition is met' if x condition else 'value if condition is not met')
Calm Crab