I run the creation of a new column in pandas in a loop (12k values). And it gives this error:
C: \ ProgramData \ Anaconda3 \ lib \ site-packages \ pandas \ core \ indexing.py: 189:
Setting the 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)
Here is the code:
for i in range (a): if T.loc[i]>0: t.loc[i]=T[i]/T1[i] else: t.loc[i]=0 It gives an error, but generally considers it, but for a very long time ... tell me how to fix it?
t, the correct formula isT1[i]/T[i]? - MaxU 5:24 pm