diff --git a/scripts/model_figs/make_metrics_tables.py b/scripts/model_figs/make_metrics_tables.py index 3129198e..569df2c8 100644 --- a/scripts/model_figs/make_metrics_tables.py +++ b/scripts/model_figs/make_metrics_tables.py @@ -138,12 +138,15 @@ styler.set_uuid("") # export model metrics as styled HTML table and Svelte component - # draw dotted line between classification and regression metrics + # get index of MAE column + mae_col_idx = styler.columns.get_loc("MAE") + css_col_selector = f"#T_ :is(td, th):nth-child({mae_col_idx + 2})" df_to_svelte_table( styler, f"{SITE_FIGS}/metrics-table{label}.svelte", inline_props="class='roomy'", - styles="#T_ :is(td, th):nth-last-child(4) { border-left: 1px dotted white; }", + # draw dotted line between classification and regression metrics + styles=f"{css_col_selector} {{ border-left: 1px dotted white; }}", ) try: df_to_pdf(styler, f"{PDF_FIGS}/metrics-table{label}.pdf") diff --git a/site/src/figs/metrics-table-first-10k.svelte b/site/src/figs/metrics-table-first-10k.svelte index 27355ee7..45a2e30c 100644 --- a/site/src/figs/metrics-table-first-10k.svelte +++ b/site/src/figs/metrics-table-first-10k.svelte @@ -214,7 +214,7 @@ background-color: #1fa187; color: #f1f1f1; } -#T_ :is(td, th):nth-last-child(4) { border-left: 1px dotted white; } +#T_ :is(td, th):nth-child(6) { border-left: 1px dotted white; }