From d4aa40b27729436f2824aedfd64c46989274b52b Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 15 Feb 2024 16:35:37 +0100 Subject: [PATCH] fix(code): Ensure all studies are part of intervention df Some studies were missing crucial fields (prelim studies mostly) which means they are dropped from being counted in 'by_intervention' aggregation. While ultimately those will have to have their fields filled correctly, for now we can simply ensure all studies are aggregated correctly per intervention. --- scoping_review.qmd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scoping_review.qmd b/scoping_review.qmd index f953e9e..3fb64d7 100644 --- a/scoping_review.qmd +++ b/scoping_review.qmd @@ -565,7 +565,9 @@ analysing the main findings per policy area, as well as underscore individual st #| fig-cap: Available studies by primary type of intervention by_intervention = ( - bib_df.groupby(["author", "year", "title", "design", "method", "representativeness", "citation"]) + bib_df + .fillna("") + .groupby(["author", "year", "title", "design", "method", "representativeness", "citation"]) .agg( { "intervention": lambda _col: "; ".join(_col),