pandas if value in column replace in another column code example
Example 1: replace one row with another in python
df.loc[(df.Event == 'Dance'),'Event']='Hip-Hop'
df
Example 2: replace 3 column with another column pandas
df['B'] = df1['E']
df.loc[(df.Event == 'Dance'),'Event']='Hip-Hop'
df
df['B'] = df1['E']