data frame replace 0 and 1 code example Example: replacing values in pandas dataframe df['coloum'] = df['coloum'].replace(['value_1','valu_2'],'new_value')