如果满足其他功能的条件,我需要将数据框功能的某些行设置为零:
.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