满足其他要素的条件,为要素的行分配0值

时间:2019-09-05 09:28:50

标签: python-3.x

如果满足其他功能的条件,我需要将数据框功能的某些行设置为零:

.py:

train = train_set.copy()

    for i in range(1, len(train)):
        temp = train['Vout'].loc[i]
        if temp == 0:
            train['Zimag'].loc[i] = 0

但是我收到此消息:

SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

0 个答案:

没有答案