when a condition is true set values of column python code example Example: set value based on column df.loc[df['c1'] == 'Value', 'c2'] = 10