replace values in one column from another column pandas 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']