Spaces:
Running
Running
James McCool
commited on
Commit
·
3f36e0d
1
Parent(s):
293c9b3
Add salary range filter to projection display
Browse files
app.py
CHANGED
@@ -344,10 +344,16 @@ with tab1:
|
|
344 |
team_var2 = raw_baselines.Team.values.tolist()
|
345 |
|
346 |
pos_var2 = st.selectbox('Position Filter', options=['All', 'PG', 'SG', 'SF', 'PF', 'C'], key='pos_var2')
|
|
|
|
|
|
|
|
|
|
|
347 |
|
348 |
display_container_1 = st.empty()
|
349 |
display_dl_container_1 = st.empty()
|
350 |
display_proj = raw_baselines[raw_baselines['Team'].isin(team_var2)]
|
|
|
351 |
if view_var2 == 'Advanced':
|
352 |
display_proj = display_proj[['Player', 'Minutes Proj', 'Position', 'Team', 'Opp', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '20+%', '4x%', '5x%', '6x%', 'GPP%',
|
353 |
'Own', 'Small_Own', 'Large_Own', 'Cash_Own', 'CPT_Own', 'LevX', 'ValX']]
|
|
|
344 |
team_var2 = raw_baselines.Team.values.tolist()
|
345 |
|
346 |
pos_var2 = st.selectbox('Position Filter', options=['All', 'PG', 'SG', 'SF', 'PF', 'C'], key='pos_var2')
|
347 |
+
col1, col2 = st.columns(2)
|
348 |
+
with col1:
|
349 |
+
low_salary = st.number_input('Enter Lowest Salary', min_value=3000, max_value=15000, value=3000, step=100, key='low_salary')
|
350 |
+
with col2:
|
351 |
+
high_salary = st.number_input('Enter Highest Salary', min_value=3000, max_value=15000, value=15000, step=100, key='high_salary')
|
352 |
|
353 |
display_container_1 = st.empty()
|
354 |
display_dl_container_1 = st.empty()
|
355 |
display_proj = raw_baselines[raw_baselines['Team'].isin(team_var2)]
|
356 |
+
display_proj = display_proj[display_proj['Salary'].between(low_salary, high_salary)]
|
357 |
if view_var2 == 'Advanced':
|
358 |
display_proj = display_proj[['Player', 'Minutes Proj', 'Position', 'Team', 'Opp', 'Salary', 'Floor', 'Median', 'Ceiling', 'Top_finish', 'Top_5_finish', 'Top_10_finish', '20+%', '4x%', '5x%', '6x%', 'GPP%',
|
359 |
'Own', 'Small_Own', 'Large_Own', 'Cash_Own', 'CPT_Own', 'LevX', 'ValX']]
|