From 8e6c28b7fb4057d99fd77007d4f91decdffd309d Mon Sep 17 00:00:00 2001 From: Israel Figueroa Date: Sat, 18 Jan 2025 23:39:03 -0300 Subject: [PATCH] sup --- load_dataset.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/load_dataset.py b/load_dataset.py index 1a4d9e2..5db8287 100644 --- a/load_dataset.py +++ b/load_dataset.py @@ -103,10 +103,11 @@ def analisis_univariado(dfi, target=None, continuas=[], discretas=[]): f"Porcentajes: {percentages.values.round(1)}", test_result ]) - tot = freq_table[0][1] + freq_table[1][1] + freq_matrix = freq_table.values + tot = freq_matrix[0][1] + freq_matrix[1][1] totf = 100 * tot / len(dfi[var]) resultsmody.append([ - var, " ", f"{percentages[0][1]:.1f} ({freq_table[0][1]}/{len(group1)})", f"{percentages[1][1]:.1f} ({freq_table[1][1]}/{len(group2)})" + var, " ", f"{percentages[0][1]:.1f} ({freq_matrix[0][1]}/{len(group1)})", f"{percentages[1][1]:.1f} ({freq_matrix[1][1]}/{len(group2)})" f"{fisher_pval:.3f}", ("*" if fisher_pval < 0.05 else "NS"), f"{totf:.1f} ({tot}/{len(dfi[var])})" ])