I'm trying to add new columns in the CSV file.
When I use df3['New header'] = None
I got the error below
`/Users/seven/PycharmProjects/Python3/venv/lib/python3.7/site-packages/pandas/core/indexing.py:966: SettingWithCopyWarning:
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
See the caveats in the documentation:
https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
self.obj[item] = s
So I changed into df3.loc[index, 'New header'] = None
But I got the same error again.
The interesting part is both ways are adding the new column successfully.
How can I get rid of the error message?
Thanks