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
This means currently the various usages in stunting are not behaving as expected. This I think explains at least some of the differences we see between the population dataframes outputted by simulations using Pandas v1.2.2 and v2.0.0 as mentioned in #763 (comment).
The text was updated successfully, but these errors were encountered:
In the stunting module, the
Series.between
method is passedinclusive='left'
at various pointsTLOmodel/src/tlo/methods/stunting.py
Lines 216 to 217 in d6dc5d8
TLOmodel/src/tlo/methods/stunting.py
Lines 315 to 329 in d6dc5d8
TLOmodel/src/tlo/methods/stunting.py
Lines 351 to 353 in d6dc5d8
TLOmodel/src/tlo/methods/stunting.py
Lines 362 to 376 in d6dc5d8
This follows the usage recommended in the guidance notes in the wiki I wrote. Unfortunately it turns out I didn't check the Pandas documentation carefully enough when writing these, as for Pandas v1.2
inclusive
should be a boolean argument corresponding to whether to include both bounds in the test or not. In Pandas v1.3inclusive
was changed to instead be a string argument which can take values in{"both", "neither", "left", "right"}
, which corresponds to the expected behaviour for the usage recommended in the wiki and currently used in stunting. Passing a string for theinclusive
argument in Pandas v1.2.2 (the version we are currently using) doesn't raise an error as the argument value is used directly as a boolean condition. As non-empty strings correspond toTrue
in Python this means with Pandas v1.2.2 usinginclusive="left"
acts equivalently toinclusive=True
(and toinclusive="both"
in Pandas v1.3 and above).This means currently the various usages in stunting are not behaving as expected. This I think explains at least some of the differences we see between the population dataframes outputted by simulations using Pandas v1.2.2 and v2.0.0 as mentioned in #763 (comment).
The text was updated successfully, but these errors were encountered: