if else new column pandas code example
Example: make a condition statement on column pandas
df.loc[df['column name'] condition, 'new column name'] = 'value if condition is met'
df.loc[df['column name'] condition, 'new column name'] = 'value if condition is met'