How to conditionally update DataFrame column in Pandas January 25, 2023 by Tarik df.loc[df['line_race'] == 0, 'rating'] = 0