Closed patrickleonardy closed 1 year ago
Not a solution, rather a workaround:
In your notebook or script you can suppress the future warnings explicitly as follows:
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
If the warnings stem from the pandas.append
action, then the append
method should be replaced with pandas.concat
.
Alternatively, one could think of explicitly setting an old version of pandas in the cobra requirements so that pandas won't complain anymore (for the append
vs concat
example given pandas<1.4.0
).
Depending on what the warnings are, I disagree with adding a cobra setting to suppress the warnings. If the warnings are on our (cobra) side, we should fix them instead of suppressing them.
To help you decide on this, possibility 1 and 2 are covered with #159 and #160. Since short term fix would be to impose our users to use only pandas<2 (#159), I side with @ZlaTanskY and would say indeed, let's not filter them, imposing the pandas<2 will make sure they never get to see the warnings anyway.
I see in the pull request that you fixed the .loc stuff to avoid the FutureWarnings. With the above two comments, don't ditch the pull request you've made however, it's still relevant to #160! Maybe link the pull request to #160 instead of this issue #156, and if this issue #156 is only about suppressing future warnings, then you can close this one since both me and Jano voted against supressing.
I did nothing to suppress them I only changed the code that was raising FutureWarnings to an other syntax that does not raise a FutureWarning. Including things that are linked to #160 When you say that I should not ditch it you mean that I should not yet merge it and only merge it with #160 ?
Fixing FutureWarnings
Task: Currently there are a lot of FutureWarinings (generated by pandas) popping up in Cobra that clutter up once notebook. We should change this behavior such that cobra is up to date.
Task Description
This issue will: