You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Adapt the cobra code such that no more FutureWarnings appear.
Cobra get a setting that allows the user to suppress FutureWarings
We could also see if it is possible to implement some checks that we are up to date if something changes in the libraries that we are using.
If the warnings stem from the pandas.append action, then the append method should be replaced with pandas.concat.
Possibility 2
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 ?
Activity
pietrodantuono commentedon Apr 3, 2023
Not a solution, rather a workaround:
In your notebook or script you can suppress the future warnings explicitly as follows:
Some discussion
Possibility 1
If the warnings stem from the
pandas.appendaction, then theappendmethod should be replaced withpandas.concat.Possibility 2
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
appendvsconcatexample givenpandas<1.4.0).ZlaTanskY commentedon Apr 4, 2023
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.
sandervh14 commentedon Apr 6, 2023
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.
sandervh14 commentedon Apr 6, 2023
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.
patrickleonardy commentedon Apr 6, 2023
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 ?