main
parent
8e6c28b7fb
commit
6dcb675c59
|
@ -104,10 +104,11 @@ def analisis_univariado(dfi, target=None, continuas=[], discretas=[]):
|
|||
test_result
|
||||
])
|
||||
freq_matrix = freq_table.values
|
||||
percentages_matrix = percentages.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_matrix[0][1]}/{len(group1)})", f"{percentages[1][1]:.1f} ({freq_matrix[1][1]}/{len(group2)})"
|
||||
var, " ", f"{percentages_matrix[0][1]:.1f} ({freq_matrix[0][1]}/{len(group1)})", f"{percentages_matrix[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])})"
|
||||
])
|
||||
|
||||
|
|
Loading…
Reference in New Issue