반응형 벼락치기1 003_제3유형_구름 기반 실습 import pandas as pd from scipy.stats import chi2_contingency # Load the Titanic dataset df = pd.read_csv("data/Titanic.csv") # Create a contingency table for 'Gender' and 'Survived' table = pd.crosstab(df['Gender'], df['Survived']) # Perform the chi-squared test statistics, p, degrees_of_freedom, expected = chi2_contingency(table) # Print the chi-squared statistic rounded to 3 decimal placesprin.. 2024. 11. 12. 이전 1 다음 반응형