Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -249,7 +249,13 @@ if main_option == "Tabulation":
|
|
249 |
matching_cols = [col for col in df.columns if is_matching_pattern(col, var)]
|
250 |
if matching_cols:
|
251 |
subset_df = df[matching_cols]
|
252 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
st.subheader("Multiple Answer Analysis Results")
|
254 |
st.dataframe(result_df)
|
255 |
|
@@ -278,7 +284,7 @@ if main_option == "Tabulation":
|
|
278 |
st.plotly_chart(fig, use_container_width=True)
|
279 |
|
280 |
elif type1 == "Single answer" and type2 == "Multiple answer":
|
281 |
-
matching_cols = [col for col in df.columns if is_matching_pattern(col,
|
282 |
if matching_cols:
|
283 |
percentile_df, frequency_df = two_variable_sm(df[[var1] + matching_cols], var1, matching_cols)
|
284 |
st.subheader("Percentage Table")
|
|
|
249 |
matching_cols = [col for col in df.columns if is_matching_pattern(col, var)]
|
250 |
if matching_cols:
|
251 |
subset_df = df[matching_cols]
|
252 |
+
#####################################################################
|
253 |
+
try:
|
254 |
+
result_df = multi_answer(subset_df)
|
255 |
+
|
256 |
+
except Exception as e:
|
257 |
+
st.error(f"❌ Error reading the Excel file: {e}")
|
258 |
+
|
259 |
st.subheader("Multiple Answer Analysis Results")
|
260 |
st.dataframe(result_df)
|
261 |
|
|
|
284 |
st.plotly_chart(fig, use_container_width=True)
|
285 |
|
286 |
elif type1 == "Single answer" and type2 == "Multiple answer":
|
287 |
+
matching_cols = [col for col in df.columns if is_matching_pattern(col, var2)]
|
288 |
if matching_cols:
|
289 |
percentile_df, frequency_df = two_variable_sm(df[[var1] + matching_cols], var1, matching_cols)
|
290 |
st.subheader("Percentage Table")
|