Suppose I have a dataframe df with columns a, b, c, d and I want to subtract mean of the columns from columns a,b,d. How do I achieve the same?
I have tried df[['a','b','d']] = df[['a','b','d']] - df[['a','b','d']].mean()
but I get SettingWithCopyWarning. How do I achieve the same without the warning?