check one value in a column and replace with other column code example Example: replace values in a column by condition python df.loc[df['employrate'] > 70, 'employrate'] = 7