Spaces:
Running
Running
James McCool
commited on
Commit
·
02d2bcd
1
Parent(s):
004ee91
Refactor summary statistics calculations in app.py: streamline the computation of minimum, average, maximum, and standard deviation for salary, project, and own metrics by correcting column indices, enhancing data accuracy and clarity in the displayed results.
Browse files
app.py
CHANGED
@@ -740,22 +740,22 @@ with tab2:
|
|
740 |
summary_df = pd.DataFrame({
|
741 |
'Metric': ['Min', 'Average', 'Max', 'STDdev'],
|
742 |
'Salary': [
|
|
|
|
|
|
|
|
|
|
|
|
|
743 |
np.min(st.session_state.working_seed[:,7]),
|
744 |
np.mean(st.session_state.working_seed[:,7]),
|
745 |
np.max(st.session_state.working_seed[:,7]),
|
746 |
np.std(st.session_state.working_seed[:,7])
|
747 |
],
|
748 |
-
'Proj': [
|
749 |
-
np.min(st.session_state.working_seed[:,8]),
|
750 |
-
np.mean(st.session_state.working_seed[:,8]),
|
751 |
-
np.max(st.session_state.working_seed[:,8]),
|
752 |
-
np.std(st.session_state.working_seed[:,8])
|
753 |
-
],
|
754 |
'Own': [
|
755 |
-
np.min(st.session_state.working_seed[:,
|
756 |
-
np.mean(st.session_state.working_seed[:,
|
757 |
-
np.max(st.session_state.working_seed[:,
|
758 |
-
np.std(st.session_state.working_seed[:,
|
759 |
]
|
760 |
})
|
761 |
elif slate_type_var1 == 'Showdown':
|
@@ -832,22 +832,22 @@ with tab2:
|
|
832 |
summary_df = pd.DataFrame({
|
833 |
'Metric': ['Min', 'Average', 'Max', 'STDdev'],
|
834 |
'Salary': [
|
|
|
|
|
|
|
|
|
|
|
|
|
835 |
np.min(st.session_state.working_seed[:,8]),
|
836 |
np.mean(st.session_state.working_seed[:,8]),
|
837 |
np.max(st.session_state.working_seed[:,8]),
|
838 |
np.std(st.session_state.working_seed[:,8])
|
839 |
],
|
840 |
-
'Proj': [
|
841 |
-
np.min(st.session_state.working_seed[:,9]),
|
842 |
-
np.mean(st.session_state.working_seed[:,9]),
|
843 |
-
np.max(st.session_state.working_seed[:,9]),
|
844 |
-
np.std(st.session_state.working_seed[:,9])
|
845 |
-
],
|
846 |
'Own': [
|
847 |
-
np.min(st.session_state.working_seed[:,
|
848 |
-
np.mean(st.session_state.working_seed[:,
|
849 |
-
np.max(st.session_state.working_seed[:,
|
850 |
-
np.std(st.session_state.working_seed[:,
|
851 |
]
|
852 |
})
|
853 |
elif slate_type_var1 == 'Showdown':
|
|
|
740 |
summary_df = pd.DataFrame({
|
741 |
'Metric': ['Min', 'Average', 'Max', 'STDdev'],
|
742 |
'Salary': [
|
743 |
+
np.min(st.session_state.working_seed[:,6]),
|
744 |
+
np.mean(st.session_state.working_seed[:,6]),
|
745 |
+
np.max(st.session_state.working_seed[:,6]),
|
746 |
+
np.std(st.session_state.working_seed[:,6])
|
747 |
+
],
|
748 |
+
'Proj': [
|
749 |
np.min(st.session_state.working_seed[:,7]),
|
750 |
np.mean(st.session_state.working_seed[:,7]),
|
751 |
np.max(st.session_state.working_seed[:,7]),
|
752 |
np.std(st.session_state.working_seed[:,7])
|
753 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
754 |
'Own': [
|
755 |
+
np.min(st.session_state.working_seed[:,12]),
|
756 |
+
np.mean(st.session_state.working_seed[:,12]),
|
757 |
+
np.max(st.session_state.working_seed[:,12]),
|
758 |
+
np.std(st.session_state.working_seed[:,12])
|
759 |
]
|
760 |
})
|
761 |
elif slate_type_var1 == 'Showdown':
|
|
|
832 |
summary_df = pd.DataFrame({
|
833 |
'Metric': ['Min', 'Average', 'Max', 'STDdev'],
|
834 |
'Salary': [
|
835 |
+
np.min(st.session_state.working_seed[:,7]),
|
836 |
+
np.mean(st.session_state.working_seed[:,7]),
|
837 |
+
np.max(st.session_state.working_seed[:,7]),
|
838 |
+
np.std(st.session_state.working_seed[:,7])
|
839 |
+
],
|
840 |
+
'Proj': [
|
841 |
np.min(st.session_state.working_seed[:,8]),
|
842 |
np.mean(st.session_state.working_seed[:,8]),
|
843 |
np.max(st.session_state.working_seed[:,8]),
|
844 |
np.std(st.session_state.working_seed[:,8])
|
845 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
846 |
'Own': [
|
847 |
+
np.min(st.session_state.working_seed[:,13]),
|
848 |
+
np.mean(st.session_state.working_seed[:,13]),
|
849 |
+
np.max(st.session_state.working_seed[:,13]),
|
850 |
+
np.std(st.session_state.working_seed[:,13])
|
851 |
]
|
852 |
})
|
853 |
elif slate_type_var1 == 'Showdown':
|