Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -196,7 +196,7 @@ with tab1:
|
|
| 196 |
gc.collect()
|
| 197 |
|
| 198 |
with tab2:
|
| 199 |
-
col1, col2 = st.columns([
|
| 200 |
with col1:
|
| 201 |
hold_container = st.empty()
|
| 202 |
if st.button("Load/Reset Data", key='reset1'):
|
|
@@ -305,7 +305,9 @@ with tab2:
|
|
| 305 |
final_Proj['Player_swap'] = player_check
|
| 306 |
st.session_state.final_Proj = final_Proj
|
| 307 |
|
| 308 |
-
|
|
|
|
|
|
|
| 309 |
|
| 310 |
hold_container = st.empty()
|
| 311 |
|
|
@@ -322,4 +324,10 @@ with tab2:
|
|
| 322 |
display_container = st.empty()
|
| 323 |
if 'final_Proj' in st.session_state:
|
| 324 |
st.dataframe(st.session_state.final_Proj.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
| 325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
gc.collect()
|
| 197 |
|
| 198 |
with tab2:
|
| 199 |
+
col1, col2, col3 = st.columns([2, 6, 2])
|
| 200 |
with col1:
|
| 201 |
hold_container = st.empty()
|
| 202 |
if st.button("Load/Reset Data", key='reset1'):
|
|
|
|
| 305 |
final_Proj['Player_swap'] = player_check
|
| 306 |
st.session_state.final_Proj = final_Proj
|
| 307 |
|
| 308 |
+
st.session_state.player_freq = pd.DataFrame(np.column_stack(np.unique(st.session_state.display_portfolio.iloc[:,0:9].values, return_counts=True)),
|
| 309 |
+
columns=['Player','Freq']).sort_values('Freq', ascending=False).reset_index(drop=True)
|
| 310 |
+
st.session_state.player_freq['Freq'] = st.session_state.player_freq['Freq'].astype(int)
|
| 311 |
|
| 312 |
hold_container = st.empty()
|
| 313 |
|
|
|
|
| 324 |
display_container = st.empty()
|
| 325 |
if 'final_Proj' in st.session_state:
|
| 326 |
st.dataframe(st.session_state.final_Proj.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
| 327 |
+
with col3:
|
| 328 |
+
freq_container = st.empty()
|
| 329 |
+
with freq_container:
|
| 330 |
+
freq_container = st.empty()
|
| 331 |
+
if 'player_freq' in st.session_state:
|
| 332 |
+
st.dataframe(st.session_state.player_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
| 333 |
+
|