James McCool commited on
Commit
a245a96
·
1 Parent(s): 71230df

Refactor app.py: Correct column references for ownership calculations and site filtering. Updated DataFrame column names from 'site' to 'Site' for consistency and adjusted ownership index references from 12 to 9 for both DraftKings and FanDuel, ensuring accurate data processing.

Browse files
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -151,10 +151,10 @@ with tab2:
151
 
152
  if site_var1 == 'Draftkings':
153
  raw_baselines = hold_display
154
- ROO_slice = raw_baselines[raw_baselines['site'] == 'Draftkings']
155
  # Get the minimum and maximum ownership values from dk_lineups
156
- min_own = np.min(dk_lineups[:,12])
157
- max_own = np.max(dk_lineups[:,12])
158
  column_names = dk_columns
159
 
160
  player_var1 = st.radio("Do you want a frame with specific Players?", ('Full Slate', 'Specific Players'), key='player_var1')
@@ -165,9 +165,9 @@ with tab2:
165
 
166
  elif site_var1 == 'Fanduel':
167
  raw_baselines = hold_display
168
- ROO_slice = raw_baselines[raw_baselines['site'] == 'Fanduel']
169
- min_own = np.min(fd_lineups[:,12])
170
- max_own = np.max(fd_lineups[:,12])
171
  column_names = fd_columns
172
 
173
  player_var1 = st.radio("Do you want a frame with specific Players?", ('Full Slate', 'Specific Players'), key='player_var1')
@@ -270,10 +270,10 @@ with tab2:
270
  np.std(st.session_state.working_seed[:,7])
271
  ],
272
  'Own': [
273
- np.min(st.session_state.working_seed[:,12]),
274
- np.mean(st.session_state.working_seed[:,12]),
275
- np.max(st.session_state.working_seed[:,12]),
276
- np.std(st.session_state.working_seed[:,12])
277
  ]
278
  })
279
  elif site_var1 == 'Fanduel':
@@ -292,10 +292,10 @@ with tab2:
292
  np.std(st.session_state.working_seed[:,7])
293
  ],
294
  'Own': [
295
- np.min(st.session_state.working_seed[:,12]),
296
- np.mean(st.session_state.working_seed[:,12]),
297
- np.max(st.session_state.working_seed[:,12]),
298
- np.std(st.session_state.working_seed[:,12])
299
  ]
300
  })
301
 
 
151
 
152
  if site_var1 == 'Draftkings':
153
  raw_baselines = hold_display
154
+ ROO_slice = raw_baselines[raw_baselines['Site'] == 'Draftkings']
155
  # Get the minimum and maximum ownership values from dk_lineups
156
+ min_own = np.min(dk_lineups[:,9])
157
+ max_own = np.max(dk_lineups[:,9])
158
  column_names = dk_columns
159
 
160
  player_var1 = st.radio("Do you want a frame with specific Players?", ('Full Slate', 'Specific Players'), key='player_var1')
 
165
 
166
  elif site_var1 == 'Fanduel':
167
  raw_baselines = hold_display
168
+ ROO_slice = raw_baselines[raw_baselines['Site'] == 'Fanduel']
169
+ min_own = np.min(fd_lineups[:,9])
170
+ max_own = np.max(fd_lineups[:,9])
171
  column_names = fd_columns
172
 
173
  player_var1 = st.radio("Do you want a frame with specific Players?", ('Full Slate', 'Specific Players'), key='player_var1')
 
270
  np.std(st.session_state.working_seed[:,7])
271
  ],
272
  'Own': [
273
+ np.min(st.session_state.working_seed[:,8]),
274
+ np.mean(st.session_state.working_seed[:,8]),
275
+ np.max(st.session_state.working_seed[:,8]),
276
+ np.std(st.session_state.working_seed[:,8])
277
  ]
278
  })
279
  elif site_var1 == 'Fanduel':
 
292
  np.std(st.session_state.working_seed[:,7])
293
  ],
294
  'Own': [
295
+ np.min(st.session_state.working_seed[:,8]),
296
+ np.mean(st.session_state.working_seed[:,8]),
297
+ np.max(st.session_state.working_seed[:,8]),
298
+ np.std(st.session_state.working_seed[:,8])
299
  ]
300
  })
301