I have dataframe
city_reg city_live reg_region live_region
Moscow Tver 77 69
Tambov Tumen' 86 86
I need to replace values in city_reg to values from city_live if reg_region == live_region
I try to use
df.loc[df.reg_region == df.live_region, 'city_reg'] = df['city_live']
but it returnes
ValueError: cannot reindex from a duplicate axis
How can I fix that?