Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -350,8 +350,9 @@ with tab3:
|
|
| 350 |
total_players = indv_players.Player.values.tolist()
|
| 351 |
total_dates = gamelog_table.Date.values.tolist()
|
| 352 |
|
| 353 |
-
team_var3 = st.
|
| 354 |
pos_var3 = st.selectbox('Which position would you like to view?', options = ['PG', 'SG', 'SF', 'PF', 'C'], key='pos_var3')
|
|
|
|
| 355 |
date_var3 = st.radio("Would you like to view all dates or specific ones?", ('All', 'Specific Dates'), key='date_var3')
|
| 356 |
|
| 357 |
if date_var3 == 'Specific Dates':
|
|
@@ -380,7 +381,10 @@ with tab3:
|
|
| 380 |
working_data = working_data[working_data['Min'] <= min_var3[1]]
|
| 381 |
working_data = working_data[working_data['Opp'].isin(team_var3)]
|
| 382 |
working_data = working_data.reset_index(drop=True)
|
| 383 |
-
|
|
|
|
|
|
|
|
|
|
| 384 |
gamelog_display['Avg_Fantasy'] = gamelog_display['Player'].map(fantasy_dict)
|
| 385 |
gamelog_display['Avg_FD_Fantasy'] = gamelog_display['Player'].map(fd_fantasy_dict)
|
| 386 |
display = st.container()
|
|
|
|
| 350 |
total_players = indv_players.Player.values.tolist()
|
| 351 |
total_dates = gamelog_table.Date.values.tolist()
|
| 352 |
|
| 353 |
+
team_var3 = st.selectbox('Which opponent would you like to view?', options = total_teams, key='team_var3')
|
| 354 |
pos_var3 = st.selectbox('Which position would you like to view?', options = ['PG', 'SG', 'SF', 'PF', 'C'], key='pos_var3')
|
| 355 |
+
disp_var3 = st.radio('Which view would you like to see?', options = ['Fantasy', 'Stats'], key='disp_var3')
|
| 356 |
date_var3 = st.radio("Would you like to view all dates or specific ones?", ('All', 'Specific Dates'), key='date_var3')
|
| 357 |
|
| 358 |
if date_var3 == 'Specific Dates':
|
|
|
|
| 381 |
working_data = working_data[working_data['Min'] <= min_var3[1]]
|
| 382 |
working_data = working_data[working_data['Opp'].isin(team_var3)]
|
| 383 |
working_data = working_data.reset_index(drop=True)
|
| 384 |
+
if disp_var3 == 'Fantasy':
|
| 385 |
+
gamelog_display = working_data[['Player', 'Pos', 'Team', 'Opp', 'Date', 'Min', 'Fantasy', 'FD_Fantasy']]
|
| 386 |
+
elif disp_var3 == 'Stats':
|
| 387 |
+
gamelog_display = working_data
|
| 388 |
gamelog_display['Avg_Fantasy'] = gamelog_display['Player'].map(fantasy_dict)
|
| 389 |
gamelog_display['Avg_FD_Fantasy'] = gamelog_display['Player'].map(fd_fantasy_dict)
|
| 390 |
display = st.container()
|