Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -245,7 +245,7 @@ with tab2:
|
|
| 245 |
display = display
|
| 246 |
elif pos_var1 != 'All':
|
| 247 |
display = display[display['Position'].str.contains(pos_var1)]
|
| 248 |
-
st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
| 249 |
st.download_button(
|
| 250 |
label="Export Range of Outcomes",
|
| 251 |
data=convert_df_to_csv(display),
|
|
@@ -259,10 +259,18 @@ with tab3:
|
|
| 259 |
# i.e. clear values from both square and cube
|
| 260 |
st.cache_data.clear()
|
| 261 |
roo_table, lck_overall_stacks, lck_win_stacks, lck_loss_stacks, lcs_overall_stacks, lcs_win_stacks, lcs_loss_stacks, lec_overall_stacks, lec_win_stacks, lec_loss_stacks, lck_bo1, lck_bo3, lck_bo5, lcs_bo1, lcs_bo3, lcs_bo5, lec_bo1, lec_bo3, lec_bo5 = init_baselines()
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 266 |
if league_choice3 == 'LCK/LPL':
|
| 267 |
if gametype_choice == 'Best of 1':
|
| 268 |
hold_display = lck_bo1
|
|
@@ -293,7 +301,7 @@ with tab3:
|
|
| 293 |
display = display
|
| 294 |
elif pos_var2 != 'All':
|
| 295 |
display = display[display['Position'].str.contains(pos_var2)]
|
| 296 |
-
st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
| 297 |
st.download_button(
|
| 298 |
label="Export Baselines",
|
| 299 |
data=convert_df_to_csv(display),
|
|
|
|
| 245 |
display = display
|
| 246 |
elif pos_var1 != 'All':
|
| 247 |
display = display[display['Position'].str.contains(pos_var1)]
|
| 248 |
+
st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), height=750, use_container_width = True)
|
| 249 |
st.download_button(
|
| 250 |
label="Export Range of Outcomes",
|
| 251 |
data=convert_df_to_csv(display),
|
|
|
|
| 259 |
# i.e. clear values from both square and cube
|
| 260 |
st.cache_data.clear()
|
| 261 |
roo_table, lck_overall_stacks, lck_win_stacks, lck_loss_stacks, lcs_overall_stacks, lcs_win_stacks, lcs_loss_stacks, lec_overall_stacks, lec_win_stacks, lec_loss_stacks, lck_bo1, lck_bo3, lck_bo5, lcs_bo1, lcs_bo3, lcs_bo5, lec_bo1, lec_bo3, lec_bo5 = init_baselines()
|
| 262 |
+
with st.container():
|
| 263 |
+
col1, col2, col3, col4 = st.columns([4, 2, 2, 2])
|
| 264 |
+
|
| 265 |
+
with col1:
|
| 266 |
+
league_choice3 = st.radio("What table would you like to display?", ('LCK/LPL', 'LCS', 'LEC'), key='league_var3')
|
| 267 |
+
with col2:
|
| 268 |
+
gametype_choice = st.radio("What format are the games being played?", ('Best of 1', 'Best of 3', 'Best of 5'), key='player_stats')
|
| 269 |
+
with col3:
|
| 270 |
+
pos_var2 = st.selectbox('View specific position?', options = ['All', 'TOP', 'JNG', 'MID', 'ADC', 'SUP'], key = 'proj_posvar')
|
| 271 |
+
with col4:
|
| 272 |
+
team_var2 = st.multiselect('View specific team?', options = hold_display['Team'].unique(), key = 'proj_teamvar')
|
| 273 |
+
|
| 274 |
if league_choice3 == 'LCK/LPL':
|
| 275 |
if gametype_choice == 'Best of 1':
|
| 276 |
hold_display = lck_bo1
|
|
|
|
| 301 |
display = display
|
| 302 |
elif pos_var2 != 'All':
|
| 303 |
display = display[display['Position'].str.contains(pos_var2)]
|
| 304 |
+
st.dataframe(display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), height=750, use_container_width = True)
|
| 305 |
st.download_button(
|
| 306 |
label="Export Baselines",
|
| 307 |
data=convert_df_to_csv(display),
|