langtest.utils.report_utils.color_cells#
- color_cells(series: Series, df_final_report: DataFrame)#
Apply background coloring to cells based on the “pass” value for a given model and test type.
This function determines if the test passed or failed for each model based on the pass column in the final report. Cells are colored green if the test passed and red if the test failed.
Parameters: - series (pd.Series): A Series object containing model names as its index. - df_final_report (pd.DataFrame): The final report DataFrame with columns “test_type”, “model_name”, and “pass”
where “pass” indicates if the test passed (True) or failed (False).