目录
解决问题
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: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
解决思路
参考文章 http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
当向列表中增加一列时,需要先将变量复制一份,再添加才可以
1. a=a.copy() 2. a['column01']= column