James McCool commited on
Commit
04080ce
·
1 Parent(s): bc54484

Refactor seed frame initialization functions in app.py to return the full DK and FD seed arrays instead of a sliced version based on 'sharp_split'. This change simplifies the data handling process and ensures that all relevant data is available for further processing.

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -63,9 +63,8 @@ def init_DK_seed_frames(sharp_split):
63
  raw_display = pd.DataFrame(list(cursor))
64
  raw_display = raw_display[['QB', 'RB1', 'RB2', 'WR1', 'WR2', 'WR3', 'TE', 'FLEX', 'DST', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
65
  DK_seed = raw_display.to_numpy()
66
- fp_array = DK_seed[:sharp_split, :]
67
 
68
- return fp_array
69
 
70
  @st.cache_data(ttl = 600)
71
  def init_DK_Secondary_seed_frames(sharp_split):
@@ -76,9 +75,8 @@ def init_DK_Secondary_seed_frames(sharp_split):
76
  raw_display = pd.DataFrame(list(cursor))
77
  raw_display = raw_display[['QB', 'RB1', 'RB2', 'WR1', 'WR2', 'WR3', 'TE', 'FLEX', 'DST', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
78
  DK_seed = raw_display.to_numpy()
79
- fp_array = DK_seed[:sharp_split, :]
80
 
81
- return fp_array
82
 
83
  @st.cache_data(ttl = 599)
84
  def init_FD_seed_frames(sharp_split):
@@ -89,9 +87,8 @@ def init_FD_seed_frames(sharp_split):
89
  raw_display = pd.DataFrame(list(cursor))
90
  raw_display = raw_display[['QB', 'RB1', 'RB2', 'WR1', 'WR2', 'WR3', 'TE', 'FLEX', 'DST', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
91
  FD_seed = raw_display.to_numpy()
92
- fp_array = FD_seed[:sharp_split, :]
93
 
94
- return fp_array
95
 
96
  @st.cache_data(ttl = 599)
97
  def init_FD_Secondary_seed_frames(sharp_split):
@@ -102,9 +99,8 @@ def init_FD_Secondary_seed_frames(sharp_split):
102
  raw_display = pd.DataFrame(list(cursor))
103
  raw_display = raw_display[['QB', 'RB1', 'RB2', 'WR1', 'WR2', 'WR3', 'TE', 'FLEX', 'DST', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
104
  FD_seed = raw_display.to_numpy()
105
- fp_array = FD_seed[:sharp_split, :]
106
 
107
- return fp_array
108
 
109
  @st.cache_data(ttl = 599)
110
  def init_baselines():
 
63
  raw_display = pd.DataFrame(list(cursor))
64
  raw_display = raw_display[['QB', 'RB1', 'RB2', 'WR1', 'WR2', 'WR3', 'TE', 'FLEX', 'DST', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
65
  DK_seed = raw_display.to_numpy()
 
66
 
67
+ return DK_seed
68
 
69
  @st.cache_data(ttl = 600)
70
  def init_DK_Secondary_seed_frames(sharp_split):
 
75
  raw_display = pd.DataFrame(list(cursor))
76
  raw_display = raw_display[['QB', 'RB1', 'RB2', 'WR1', 'WR2', 'WR3', 'TE', 'FLEX', 'DST', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
77
  DK_seed = raw_display.to_numpy()
 
78
 
79
+ return DK_seed
80
 
81
  @st.cache_data(ttl = 599)
82
  def init_FD_seed_frames(sharp_split):
 
87
  raw_display = pd.DataFrame(list(cursor))
88
  raw_display = raw_display[['QB', 'RB1', 'RB2', 'WR1', 'WR2', 'WR3', 'TE', 'FLEX', 'DST', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
89
  FD_seed = raw_display.to_numpy()
 
90
 
91
+ return FD_seed
92
 
93
  @st.cache_data(ttl = 599)
94
  def init_FD_Secondary_seed_frames(sharp_split):
 
99
  raw_display = pd.DataFrame(list(cursor))
100
  raw_display = raw_display[['QB', 'RB1', 'RB2', 'WR1', 'WR2', 'WR3', 'TE', 'FLEX', 'DST', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
101
  FD_seed = raw_display.to_numpy()
 
102
 
103
+ return FD_seed
104
 
105
  @st.cache_data(ttl = 599)
106
  def init_baselines():