设置熊猫的重复警告

时间:2018-01-10 08:36:51

标签: pandas

我使用pandas的应用功能:

def get_value(x):
    #processing
    return x

df['result'] = df['data'].apply(get_value)

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

如何避免此警告?

0 个答案:

没有答案