Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +14 -2
src/streamlit_app.py
CHANGED
|
@@ -242,15 +242,27 @@ else:
|
|
| 242 |
st.dataframe(h_counts.rename_axis("핸디결과").to_frame("경기 수"))
|
| 243 |
|
| 244 |
# ===============================
|
| 245 |
-
# 4) 무 = 입력 무 & 핸무 = 입력 핸무
|
| 246 |
# ===============================
|
| 247 |
-
st.subheader("③ 무
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
mask_combo = (
|
| 249 |
eq(DB["무"], base_draw) &
|
|
|
|
| 250 |
eq(DB["핸디 무"], hand_draw) &
|
|
|
|
| 251 |
(DB[["승","무","패"]].idxmin(axis=1) == base_min_label) &
|
| 252 |
(DB[["핸디 승","핸디 무","핸디 패"]].idxmin(axis=1) == hand_min_label)
|
| 253 |
)
|
|
|
|
| 254 |
subset_combo = DB.loc[mask_combo].copy()
|
| 255 |
|
| 256 |
if subset_combo.empty:
|
|
|
|
| 242 |
st.dataframe(h_counts.rename_axis("핸디결과").to_frame("경기 수"))
|
| 243 |
|
| 244 |
# ===============================
|
| 245 |
+
# 4) 무 = 입력 무 & 역배당 동일 / 핸무 = 입력 핸무 & 핸디 역배당 동일
|
| 246 |
# ===============================
|
| 247 |
+
st.subheader("③ 무 + 역배 / 핸무 + 핸디 역배 (정배 방향 모두 일치)")
|
| 248 |
+
|
| 249 |
+
# 기본시장: 무 + 역배 (정배 아닌 자리 중 최대값)
|
| 250 |
+
base_min_label = ["승","무","패"][np.argmin([base_win, base_draw, base_lose])]
|
| 251 |
+
base_dog_label = ["승","무","패"][np.argmax([base_win, base_draw, base_lose])]
|
| 252 |
+
|
| 253 |
+
# 핸디시장: 핸무 + 핸디 역배
|
| 254 |
+
hand_min_label = ["핸디 승","핸디 무","핸디 패"][np.argmin([hand_win, hand_draw, hand_lose])]
|
| 255 |
+
hand_dog_label = ["핸디 승","핸디 무","핸디 패"][np.argmax([hand_win, hand_draw, hand_lose])]
|
| 256 |
+
|
| 257 |
mask_combo = (
|
| 258 |
eq(DB["무"], base_draw) &
|
| 259 |
+
eq(DB[base_dog_label], [base_win, base_draw, base_lose][["승","무","패"].index(base_dog_label)]) &
|
| 260 |
eq(DB["핸디 무"], hand_draw) &
|
| 261 |
+
eq(DB[hand_dog_label], [hand_win, hand_draw, hand_lose][["핸디 승","핸디 무","핸디 패"].index(hand_dog_label)]) &
|
| 262 |
(DB[["승","무","패"]].idxmin(axis=1) == base_min_label) &
|
| 263 |
(DB[["핸디 승","핸디 무","핸디 패"]].idxmin(axis=1) == hand_min_label)
|
| 264 |
)
|
| 265 |
+
|
| 266 |
subset_combo = DB.loc[mask_combo].copy()
|
| 267 |
|
| 268 |
if subset_combo.empty:
|