James McCool commited on
Commit
933208f
·
1 Parent(s): 0161a01

added STDev calc

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -110,6 +110,7 @@ def init_baselines():
110
  raw_display = pd.DataFrame(list(cursor))
111
  dk_raw = raw_display[['Player', 'Position', 'Team', 'Opp', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '20+%', '2x%', '3x%', '4x%',
112
  'Own', 'Small_Field_Own', 'Large_Field_Own', 'Cash_Field_Own', 'CPT_Own', 'LevX', 'version', 'slate', 'timestamp', 'player_id', 'site']]
 
113
 
114
  collection = db["FD_NFL_ROO"]
115
  cursor = collection.find()
@@ -117,6 +118,7 @@ def init_baselines():
117
  raw_display = pd.DataFrame(list(cursor))
118
  fd_raw = raw_display[['Player', 'Position', 'Team', 'Opp', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '20+%', '2x%', '3x%', '4x%',
119
  'Own', 'Small_Field_Own', 'Large_Field_Own', 'Cash_Field_Own', 'CPT_Own', 'LevX', 'version', 'slate', 'timestamp', 'player_id', 'site']]
 
120
 
121
  return dk_raw, fd_raw
122
 
 
110
  raw_display = pd.DataFrame(list(cursor))
111
  dk_raw = raw_display[['Player', 'Position', 'Team', 'Opp', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '20+%', '2x%', '3x%', '4x%',
112
  'Own', 'Small_Field_Own', 'Large_Field_Own', 'Cash_Field_Own', 'CPT_Own', 'LevX', 'version', 'slate', 'timestamp', 'player_id', 'site']]
113
+ dk_raw['STDev'] = (dk_raw['Ceiling'] - dk_raw['Floor']) / 4
114
 
115
  collection = db["FD_NFL_ROO"]
116
  cursor = collection.find()
 
118
  raw_display = pd.DataFrame(list(cursor))
119
  fd_raw = raw_display[['Player', 'Position', 'Team', 'Opp', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '20+%', '2x%', '3x%', '4x%',
120
  'Own', 'Small_Field_Own', 'Large_Field_Own', 'Cash_Field_Own', 'CPT_Own', 'LevX', 'version', 'slate', 'timestamp', 'player_id', 'site']]
121
+ fd_raw['STDev'] = (fd_raw['Ceiling'] - fd_raw['Floor']) / 4
122
 
123
  return dk_raw, fd_raw
124