我对于此代码有问题,当我很小时,例如i = 1000,但在我的情况下,我<= 394469,它不起作用,并且我收到此消息:
C:\ Users \ andrea \ Anaconda3 \ lib \ site-packages \ pandas \ core \ indexing.py:190: SettingWithCopyWarning:试图在一个副本上设置一个值 从DataFrame切片
请参阅文档中的警告: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy self._setitem_with_indexer(索引器,值)
我可以解决此问题吗?
谢谢
i=0
while i <= 394469:
if(DBSANKEY2_ordinato['splitcodiceclientee'].iloc[i]==DBSANKEY2_ordinato['splitcodiceclientee'].
iloc[i+1]):
DBSANKEY2_ordinato['Target'].iloc[i]DBSANKEY2_ordinato['Step'].iloc[i+1]
else:
DBSANKEY2_ordinato['Target'].iloc[i] = 'Out'
i=i+1