how to change value of one column in a pandas cp;umn based on value of another column code example Example: set value based on column df.loc[df['c1'] == 'Value', 'c2'] = 10