Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from scipy.stats import chi2_contingency
|
|
8 |
import numpy as np
|
9 |
import seaborn as sns
|
10 |
import matplotlib.pyplot as plt
|
11 |
-
|
12 |
def cramers_V(var1,var2) :
|
13 |
crosstab =np.array(pd.crosstab(var1,var2, rownames=None, colnames=None)) # Cross table building
|
14 |
stat = chi2_contingency(crosstab)[0] # Keeping of the test statistic of the Chi2 test
|
@@ -18,7 +18,8 @@ def cramers_V(var1,var2) :
|
|
18 |
|
19 |
def predict(file_obj):
|
20 |
df = pd.read_csv(file_obj.name,dtype=str)
|
21 |
-
cat_df = df.select_dtypes(include=['object'])
|
|
|
22 |
for var1 in cat_df:
|
23 |
col = []
|
24 |
for var2 in cat_df :
|
|
|
8 |
import numpy as np
|
9 |
import seaborn as sns
|
10 |
import matplotlib.pyplot as plt
|
11 |
+
|
12 |
def cramers_V(var1,var2) :
|
13 |
crosstab =np.array(pd.crosstab(var1,var2, rownames=None, colnames=None)) # Cross table building
|
14 |
stat = chi2_contingency(crosstab)[0] # Keeping of the test statistic of the Chi2 test
|
|
|
18 |
|
19 |
def predict(file_obj):
|
20 |
df = pd.read_csv(file_obj.name,dtype=str)
|
21 |
+
cat_df = df.select_dtypes(include=['object'])
|
22 |
+
rows= []
|
23 |
for var1 in cat_df:
|
24 |
col = []
|
25 |
for var2 in cat_df :
|