Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -363,23 +363,30 @@ def perform_analysis():
|
|
363 |
|
364 |
if test_type == "๋
๋ฆฝ ํ๋ณธ":
|
365 |
# ์ฌ๋ผ์ด์์์ ์ ํ๋ ๋ฒ์ฃผํ ๋ณ์ ๋ชฉ๋ก ์์ฑ
|
366 |
-
active_slicers = [col for col in st.session_state.slicers.keys() if st.session_state.slicers[col]]
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
|
|
372 |
|
373 |
value_column = st.selectbox("๋น๊ตํ ๊ฐ์ด ์๋ ์ด ์ ํ:", st.session_state.numeric_columns)
|
374 |
|
|
|
375 |
if st.button("๋
๋ฆฝ ํ๋ณธ T-๊ฒ์ ์ํ"):
|
376 |
-
# ์ ํ๋
|
377 |
-
|
|
|
|
|
|
|
|
|
378 |
if len(unique_groups) == 2:
|
379 |
perform_independent_ttest(st.session_state.filtered_data, group_column, value_column)
|
380 |
else:
|
381 |
st.error(f"์ ํ๋ ๊ทธ๋ฃน ๋ณ์ '{group_column}'์๋ ์ ํํ ๋ ๊ฐ์ ๊ทธ๋ฃน์ด ์์ด์ผ ํฉ๋๋ค. ํ์ฌ ๊ทธ๋ฃน ์: {len(unique_groups)}")
|
382 |
-
|
|
|
383 |
elif test_type == "๋์ ํ๋ณธ":
|
384 |
numeric_columns = st.session_state.numeric_columns
|
385 |
column1 = st.selectbox("์ฒซ ๋ฒ์งธ ์ด ์ ํ:", numeric_columns)
|
|
|
363 |
|
364 |
if test_type == "๋
๋ฆฝ ํ๋ณธ":
|
365 |
# ์ฌ๋ผ์ด์์์ ์ ํ๋ ๋ฒ์ฃผํ ๋ณ์ ๋ชฉ๋ก ์์ฑ
|
366 |
+
# active_slicers = [col for col in st.session_state.slicers.keys() if st.session_state.slicers[col]]
|
367 |
+
active_slicers = list(st.session_state.slicers.keys())
|
368 |
+
|
369 |
+
group_column = st.selectbox(
|
370 |
+
"๊ทธ๋ฃน ๊ตฌ๋ถ์ ์ํ ์ด ์ ํ:",
|
371 |
+
options=active_slicers + [col for col in st.session_state.categorical_columns if col not in active_slicers]
|
372 |
+
)
|
373 |
|
374 |
value_column = st.selectbox("๋น๊ตํ ๊ฐ์ด ์๋ ์ด ์ ํ:", st.session_state.numeric_columns)
|
375 |
|
376 |
+
|
377 |
if st.button("๋
๋ฆฝ ํ๋ณธ T-๊ฒ์ ์ํ"):
|
378 |
+
# ์ ํ๋ ๊ทธ๋ฃน์ ์ ๋ํฌ ๊ฐ ํ์ธ
|
379 |
+
if group_column in st.session_state.slicers:
|
380 |
+
unique_groups = st.session_state.slicers[group_column]
|
381 |
+
else:
|
382 |
+
unique_groups = st.session_state.filtered_data[group_column].unique()
|
383 |
+
|
384 |
if len(unique_groups) == 2:
|
385 |
perform_independent_ttest(st.session_state.filtered_data, group_column, value_column)
|
386 |
else:
|
387 |
st.error(f"์ ํ๋ ๊ทธ๋ฃน ๋ณ์ '{group_column}'์๋ ์ ํํ ๋ ๊ฐ์ ๊ทธ๋ฃน์ด ์์ด์ผ ํฉ๋๋ค. ํ์ฌ ๊ทธ๋ฃน ์: {len(unique_groups)}")
|
388 |
+
|
389 |
+
|
390 |
elif test_type == "๋์ ํ๋ณธ":
|
391 |
numeric_columns = st.session_state.numeric_columns
|
392 |
column1 = st.selectbox("์ฒซ ๋ฒ์งธ ์ด ์ ํ:", numeric_columns)
|