From 7112b5509bcf939513ea203c76696df7a4d4b9e9 Mon Sep 17 00:00:00 2001 From: juacrumar Date: Tue, 7 May 2024 13:41:53 +0200 Subject: [PATCH] fix table chi2 grouped by --- validphys2/src/validphys/results.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/validphys2/src/validphys/results.py b/validphys2/src/validphys/results.py index 6c9e15a4b9..69eb3c397f 100644 --- a/validphys2/src/validphys/results.py +++ b/validphys2/src/validphys/results.py @@ -799,8 +799,13 @@ def groups_chi2_table(groups_data, pdf, groups_chi2, groups_each_dataset_chi2): for group, groupres, dsresults in zip(groups_data, groups_chi2, groups_each_dataset_chi2): for dataset, dsres in zip(group, dsresults): stats = chi2_stats(dsres) - stats["group"] = dataset.name + stats["dataset"] = dataset.name + stats["group"] = str(group) records.append(stats) + stats = chi2_stats(groupres) + stats["group"] = str(group) + stats["dataset"] = "" + records.append(stats) return pd.DataFrame(records)