嗨,我正在尝试用0填充所有数字列(float64),并用NA填充所有非数字列(!= float64)。但是,出现以下错误。
k.loc[:,non_num_col_set]=k.loc[:,non_num_col_set].fillna('NA')
k.loc[:,num_col_set]=k.loc[:,num_col_set].fillna(0)
其中k是一个数据帧。
/opt/anaconda2/envs/py35-conda/lib/python3.5/site-packages/pandas/core/indexing.py:517: 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
self.obj[item] = s