James McCool
commited on
Commit
·
420ea34
1
Parent(s):
81ad445
Update sorting logic for ROI frame in app.py
Browse files- Changed the sorting criterion for the ROI frame from 'ROI' to 'Total Payout', ensuring that the displayed data prioritizes total payout amounts for better analysis.
app.py
CHANGED
|
@@ -912,7 +912,7 @@ if selected_tab == 'Contest Analysis':
|
|
| 912 |
roi_frame['Total Payout'] = roi_frame.groupby('BaseName')['payout'].transform('sum')
|
| 913 |
roi_frame['ROI'] = (roi_frame['Total Payout'] / roi_frame['Total Fees'])
|
| 914 |
roi_frame = roi_frame[['BaseName', 'EntryCount', 'Total Fees', 'Total Payout', 'ROI']].drop_duplicates(subset='BaseName', keep='first')
|
| 915 |
-
st.session_state['ROI_frame'] = roi_frame.sort_values(by='
|
| 916 |
if user_ROI_var == 'Specific':
|
| 917 |
st.session_state['ROI_frame'] = st.session_state['ROI_frame'][st.session_state['ROI_frame']['BaseName'].isin(user_ROI_select)]
|
| 918 |
|
|
|
|
| 912 |
roi_frame['Total Payout'] = roi_frame.groupby('BaseName')['payout'].transform('sum')
|
| 913 |
roi_frame['ROI'] = (roi_frame['Total Payout'] / roi_frame['Total Fees'])
|
| 914 |
roi_frame = roi_frame[['BaseName', 'EntryCount', 'Total Fees', 'Total Payout', 'ROI']].drop_duplicates(subset='BaseName', keep='first')
|
| 915 |
+
st.session_state['ROI_frame'] = roi_frame.sort_values(by='Total Payout', ascending=False)
|
| 916 |
if user_ROI_var == 'Specific':
|
| 917 |
st.session_state['ROI_frame'] = st.session_state['ROI_frame'][st.session_state['ROI_frame']['BaseName'].isin(user_ROI_select)]
|
| 918 |
|