0

By following other stackoverflow questions like this on avoiding the SettingWithCopyWarning: warning, I don't see a way to avoid this warning while we replace the indexed row value itself.

df.loc[df['Country']=='UKingdom','Country'] = 'UK'

Trying without .loc doesn't help either.

df[df['Country']=='UKingdom']['Country'] = 'UK'

Any way out? Please suggest.

Salih
  • 391
  • 1
  • 13

0 Answers0