aquacropos / aquacrop

AquaCrop-OSPy: Python implementation of AquaCrop-OS
https://aquacropos.github.io/aquacrop/
Apache License 2.0
102 stars 73 forks source link

FutureWarning regarding Pandas loc/iloc in soil.py #83

Closed TomasMiskov closed 1 year ago

TomasMiskov commented 1 year ago

Getting the following FutureWarning:

C:\Users\...\miniconda3\lib\site-packages\aquacrop\entities\soil.py:333: FutureWarning: 
In a future version, `df.iloc[:, i] = newvals` will attempt to set the values inplace instead of always setting a new array.
To retain the old behavior, use either `df[df.columns[i]] = newvals` or, if columns are non-unique, `df.isetitem(i, newvals)`

Seems like it concerns lines 321-338 and 348-350 in soil.py Will have a look if I can fix it, seems like a simple patch.

chris-s-bowden commented 1 year ago

Thanks for raising this. The lines you mention appear to now follow the recommended syntax in the FutureWarning and there is no longer a warning so will close this issue.