James McCool
commited on
Commit
·
dc6fa4a
1
Parent(s):
20b1faf
Update DataFrame player type conversion in app.py
Browse files- Added type conversion for the 'Player' column in the stack size DataFrame to ensure consistent string representation, improving data integrity and usability in the display.
app.py
CHANGED
|
@@ -594,10 +594,11 @@ with tab2:
|
|
| 594 |
hide_index=True)
|
| 595 |
else:
|
| 596 |
st.session_state['stack_size_frame'] = create_stack_size_exposures(st.session_state['display_contest_info'], st.session_state['entry_names'])
|
|
|
|
| 597 |
st.dataframe(st.session_state['stack_size_frame'].
|
| 598 |
sort_values(by='Exposure Overall', ascending=False).
|
| 599 |
style.background_gradient(cmap='RdYlGn').
|
| 600 |
-
format(formatter='{:.2%}', subset=st.session_state['stack_size_frame'][
|
| 601 |
hide_index=True)
|
| 602 |
|
| 603 |
with tab4:
|
|
|
|
| 594 |
hide_index=True)
|
| 595 |
else:
|
| 596 |
st.session_state['stack_size_frame'] = create_stack_size_exposures(st.session_state['display_contest_info'], st.session_state['entry_names'])
|
| 597 |
+
st.session_state['stack_size_frame']['Player'] = st.session_state['stack_size_frame']['Player'].astype(str)
|
| 598 |
st.dataframe(st.session_state['stack_size_frame'].
|
| 599 |
sort_values(by='Exposure Overall', ascending=False).
|
| 600 |
style.background_gradient(cmap='RdYlGn').
|
| 601 |
+
format(formatter='{:.2%}', subset=st.session_state['stack_size_frame'].iloc[:, 1:].select_dtypes(include=['number']).columns),
|
| 602 |
hide_index=True)
|
| 603 |
|
| 604 |
with tab4:
|