Spaces:
Running
Running
James McCool
commited on
Commit
·
92d0a1f
1
Parent(s):
b7fd8ba
Fix column indexing in app.py for FLEX and goalie calculations based on site selection. Updated DataFrame slicing to ensure accurate frequency counts for Draftkings and Fanduel, enhancing data processing consistency in simulations.
Browse files
app.py
CHANGED
@@ -430,7 +430,7 @@ with tab1:
|
|
430 |
st.session_state.dmen_freq = dmen_working.copy()
|
431 |
|
432 |
if sim_site_var1 == 'Draftkings':
|
433 |
-
flex_working = pd.DataFrame(np.column_stack(np.unique(st.session_state.freq_copy.iloc[:,
|
434 |
columns=['Player','Freq']).sort_values('Freq', ascending=False).reset_index(drop=True)
|
435 |
elif sim_site_var1 == 'Fanduel':
|
436 |
flex_working = pd.DataFrame(np.column_stack(np.unique(st.session_state.freq_copy.iloc[:,6:8].values, return_counts=True)),
|
@@ -445,7 +445,7 @@ with tab1:
|
|
445 |
st.session_state.flex_freq = flex_working.copy()
|
446 |
|
447 |
if sim_site_var1 == 'Draftkings':
|
448 |
-
goalie_working = pd.DataFrame(np.column_stack(np.unique(st.session_state.freq_copy.iloc[:,8
|
449 |
columns=['Player','Freq']).sort_values('Freq', ascending=False).reset_index(drop=True)
|
450 |
elif sim_site_var1 == 'Fanduel':
|
451 |
goalie_working = pd.DataFrame(np.column_stack(np.unique(st.session_state.freq_copy.iloc[:,8:9].values, return_counts=True)),
|
|
|
430 |
st.session_state.dmen_freq = dmen_working.copy()
|
431 |
|
432 |
if sim_site_var1 == 'Draftkings':
|
433 |
+
flex_working = pd.DataFrame(np.column_stack(np.unique(st.session_state.freq_copy.iloc[:,8:9].values, return_counts=True)),
|
434 |
columns=['Player','Freq']).sort_values('Freq', ascending=False).reset_index(drop=True)
|
435 |
elif sim_site_var1 == 'Fanduel':
|
436 |
flex_working = pd.DataFrame(np.column_stack(np.unique(st.session_state.freq_copy.iloc[:,6:8].values, return_counts=True)),
|
|
|
445 |
st.session_state.flex_freq = flex_working.copy()
|
446 |
|
447 |
if sim_site_var1 == 'Draftkings':
|
448 |
+
goalie_working = pd.DataFrame(np.column_stack(np.unique(st.session_state.freq_copy.iloc[:,7:8].values, return_counts=True)),
|
449 |
columns=['Player','Freq']).sort_values('Freq', ascending=False).reset_index(drop=True)
|
450 |
elif sim_site_var1 == 'Fanduel':
|
451 |
goalie_working = pd.DataFrame(np.column_stack(np.unique(st.session_state.freq_copy.iloc[:,8:9].values, return_counts=True)),
|