samedi 11 mai 2019

if on indexing of DB ordering

I have a problem for this code, it works when i is small for example i= 1000 but in my case i <= 394469 and it does not work and I have this message:

C:\Users\andrea\Anaconda3\lib\site-packages\pandas\core\indexing.py:190: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy self._setitem_with_indexer(indexer, value)

Can I resolve this problem ?

Thanks

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

Aucun commentaire:

Enregistrer un commentaire