Skip to content

Commit

Permalink
fix supplemented data
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewscolm committed Feb 29, 2024
1 parent 02294b0 commit f9cd832
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
11 changes: 4 additions & 7 deletions analysis/report_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,7 @@ def report_state_change(
definitions_sus_5_ctv3 = ["ethnicity_5", "any"]
definitions_sus_16 = ["ethnicity_new_16", "any"]
definitions_sus_16_ctv3 = ["ethnicity_16", "any"]
definitions_supplemented_ctv3_5 = ["ethnicity_5", "supplemented"]
definitions_supplemented_5 = ["ethnicity_new_5", "supplemented"]
definitions_supplemented_16 = ["ethnicity_new_16", "supplemented"]
definitions_supplemented_ctv3_16 = ["ethnicity_16", "supplemented"]

covariates = [
"_age_band",
"_sex",
Expand Down Expand Up @@ -547,7 +544,7 @@ def main():
missing=False,
)
report_patient_counts(
definitions_supplemented_ctv3_5,
definitions_sus_5_ctv3,
group_5,
"ctv3_sus",
input_path_sus,
Expand Down Expand Up @@ -593,7 +590,7 @@ def main():
missing=False,
)
report_patient_counts(
definitions_supplemented_ctv3_16,
definitions_sus_16_ctv3,
group_16,
"ctv3_sus",
input_path_sus,
Expand All @@ -605,7 +602,7 @@ def main():
)

report_patient_counts(
definitions_supplemented_16,
definitions_sus_16,
group_16,
"new_sus",
input_path_sus,
Expand Down
3 changes: 2 additions & 1 deletion notebooks_jupyter/local_runs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
" ).set_index([\"group\", \"subgroup\"])\n",
" for col in df_append.columns[df_append.columns.str.endswith('supplemented')]:\n",
" df_append=df_append.rename(columns={col: f\"{col}_filled\"})\n",
" \n",
" for col in df_append.columns[df_append.columns.str.endswith(\"any\")]:\n",
" df_append = df_append.rename(columns={col: f\"{col}_filled\"})\n",
" # df_append.drop(\"population\", inplace=True, axis=1)\n",
" for definition in definitions:\n",
" \n",
Expand Down

0 comments on commit f9cd832

Please sign in to comment.