I am trying to add a new column to my pandas dataframe called cumulative cases and have tried using
df.loc[:,"cumulative cases"] = df["Cases"].cumsum()
this gives me the warning
A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead
self.obj[key] = value
I don't understand what I have to do to remove this warning, the output is what I wanted even with this warning