diff --git a/src/model/validity.py b/src/model/validity.py index d493fb5..f3922d5 100644 --- a/src/model/validity.py +++ b/src/model/validity.py @@ -19,9 +19,15 @@ def _combined_validities( return combined = 0.0 for study in apply_to.split(";"): + if study not in by_intervention["citation"].unique(): + print( + f"WARNING: Findings table {study} study did not match any study in interventions dataframe!" + ) new = by_intervention.loc[by_intervention["citation"] == study, column] - if len(new) > 0 and not math.isnan(new.iat[0]): - combined += new.iat[0] + if len(new) == 0 or math.isnan(new.iat[0]): + continue + combined += new.iat[0] + if combined: return _binned_strength(combined) return r"\-"