Example:
This is based on 列1 == '旧值'
this condition, the 列2
designated new value
df.loc[df[(df.列1 == '旧值')].index.tolist(),'列2'] = '新的值'
Example:
This is based on 列1 == '旧值'
this condition, the 列2
designated new value
df.loc[df[(df.列1 == '旧值')].index.tolist(),'列2'] = '新的值'