Spaces:
Running
Running
James McCool
commited on
Commit
·
3c18bf4
1
Parent(s):
a012584
Adding some checks
Browse files
app.py
CHANGED
@@ -227,6 +227,7 @@ with tab1:
|
|
227 |
if pos_var1 == 'Specific Positions':
|
228 |
raw_baselines = raw_baselines[raw_baselines['Position'].isin(pos_var_list)]
|
229 |
player_check = raw_baselines['Player'].head(top_x_var).tolist()
|
|
|
230 |
final_proj_list = []
|
231 |
for players in player_check:
|
232 |
players_pos = pos_dict[players]
|
@@ -234,9 +235,12 @@ with tab1:
|
|
234 |
player_var = player_var.reset_index()
|
235 |
working_roo_temp = working_roo[working_roo['Position'] == players_pos]
|
236 |
working_roo_temp = working_roo_temp[working_roo_temp['Team'].isin(team_var1)]
|
|
|
237 |
working_roo_temp = working_roo_temp.loc[(working_roo_temp['Salary'] >= player_var['Salary'][0] - Salary_var) & (working_roo_temp['Salary'] <= player_var['Salary'][0] + Salary_var)]
|
238 |
working_roo_temp = working_roo_temp.loc[(working_roo_temp['Median'] >= player_var['Median'][0] - Median_var) & (working_roo_temp['Median'] <= player_var['Median'][0] + Median_var)]
|
239 |
|
|
|
|
|
240 |
flex_file = working_roo[['Player', 'Position', 'Salary', 'Median', 'Minutes']]
|
241 |
flex_file['Floor'] = (flex_file['Median'] * .25) + (flex_file['Minutes'] * .25)
|
242 |
flex_file['Ceiling'] = flex_file['Median'] + 10 + (flex_file['Minutes'] * .25)
|
|
|
227 |
if pos_var1 == 'Specific Positions':
|
228 |
raw_baselines = raw_baselines[raw_baselines['Position'].isin(pos_var_list)]
|
229 |
player_check = raw_baselines['Player'].head(top_x_var).tolist()
|
230 |
+
st.write(player_check)
|
231 |
final_proj_list = []
|
232 |
for players in player_check:
|
233 |
players_pos = pos_dict[players]
|
|
|
235 |
player_var = player_var.reset_index()
|
236 |
working_roo_temp = working_roo[working_roo['Position'] == players_pos]
|
237 |
working_roo_temp = working_roo_temp[working_roo_temp['Team'].isin(team_var1)]
|
238 |
+
|
239 |
working_roo_temp = working_roo_temp.loc[(working_roo_temp['Salary'] >= player_var['Salary'][0] - Salary_var) & (working_roo_temp['Salary'] <= player_var['Salary'][0] + Salary_var)]
|
240 |
working_roo_temp = working_roo_temp.loc[(working_roo_temp['Median'] >= player_var['Median'][0] - Median_var) & (working_roo_temp['Median'] <= player_var['Median'][0] + Median_var)]
|
241 |
|
242 |
+
st.write(working_roo_temp)
|
243 |
+
|
244 |
flex_file = working_roo[['Player', 'Position', 'Salary', 'Median', 'Minutes']]
|
245 |
flex_file['Floor'] = (flex_file['Median'] * .25) + (flex_file['Minutes'] * .25)
|
246 |
flex_file['Ceiling'] = flex_file['Median'] + 10 + (flex_file['Minutes'] * .25)
|