Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TomasMiskov opened this issue Dec 5, 2022 · 1 comment
Closed

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

TomasMiskov opened this issue Dec 5, 2022 · 1 comment

Comments

@TomasMiskov
Copy link

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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants