pandas set column value based on 2 columns code example
Example 1: set value based on column
df.loc[df['c1'] == 'Value', 'c2'] = 10
Example 2: rename rows pandas based on condiions
df.loc[(df.Event == 'Dance'),'Event']='Hip-Hop'
df
df.loc[df['c1'] == 'Value', 'c2'] = 10
df.loc[(df.Event == 'Dance'),'Event']='Hip-Hop'
df