Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,6 +109,7 @@ def init_baselines():
|
|
| 109 |
'MATCHUP', 'WL', 'backlog_lookup', 'Task', 'game_players'])
|
| 110 |
game_rot[data_cols] = game_rot[data_cols].apply(pd.to_numeric, errors='coerce')
|
| 111 |
game_rot['spread'] = game_rot['GAME_ID'].map(spread_dict)
|
|
|
|
| 112 |
|
| 113 |
timestamp = gamelog_table['Date'].max()
|
| 114 |
|
|
@@ -602,6 +603,8 @@ with tab5:
|
|
| 602 |
total_teams = indv_teams.Team.values.tolist()
|
| 603 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
| 604 |
total_rot_teams = indv_rot_teams.Team.values.tolist()
|
|
|
|
|
|
|
| 605 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
| 606 |
total_players = indv_players.Player.values.tolist()
|
| 607 |
total_dates = gamelog_table.Date.values.tolist()
|
|
@@ -609,7 +612,7 @@ with tab5:
|
|
| 609 |
game_rot_view = st.radio("What set would you like to view?", ('Team Rotations', 'Player Rotations'), key='game_rot_view')
|
| 610 |
|
| 611 |
if game_rot_view == 'Team Rotations':
|
| 612 |
-
game_rot_team = st.selectbox("What team would you like to work with?", options =
|
| 613 |
team_backlog = game_rot[game_rot['TEAM_ABBREVIATION'] == game_rot_team]
|
| 614 |
|
| 615 |
game_id_var = st.selectbox("What game would you like to view?", options = team_backlog['backlog_lookup'], key='game_id_var')
|
|
|
|
| 109 |
'MATCHUP', 'WL', 'backlog_lookup', 'Task', 'game_players'])
|
| 110 |
game_rot[data_cols] = game_rot[data_cols].apply(pd.to_numeric, errors='coerce')
|
| 111 |
game_rot['spread'] = game_rot['GAME_ID'].map(spread_dict)
|
| 112 |
+
game_rot['GAME_DATE'] = pd.to_datetime(game_rot['GAME_DATE']).dt.date
|
| 113 |
|
| 114 |
timestamp = gamelog_table['Date'].max()
|
| 115 |
|
|
|
|
| 603 |
total_teams = indv_teams.Team.values.tolist()
|
| 604 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
| 605 |
total_rot_teams = indv_rot_teams.Team.values.tolist()
|
| 606 |
+
indv_game_rot_teams = game_rot.drop_duplicates(subset='TEAM_ABBREVIATION')
|
| 607 |
+
total_game_rot_teams = indv_game_rot_teams.TEAM_ABBREVIATION.values.tolist()
|
| 608 |
indv_players = gamelog_table.drop_duplicates(subset='Player')
|
| 609 |
total_players = indv_players.Player.values.tolist()
|
| 610 |
total_dates = gamelog_table.Date.values.tolist()
|
|
|
|
| 612 |
game_rot_view = st.radio("What set would you like to view?", ('Team Rotations', 'Player Rotations'), key='game_rot_view')
|
| 613 |
|
| 614 |
if game_rot_view == 'Team Rotations':
|
| 615 |
+
game_rot_team = st.selectbox("What team would you like to work with?", options = total_game_rot_teams, key='game_rot_team')
|
| 616 |
team_backlog = game_rot[game_rot['TEAM_ABBREVIATION'] == game_rot_team]
|
| 617 |
|
| 618 |
game_id_var = st.selectbox("What game would you like to view?", options = team_backlog['backlog_lookup'], key='game_id_var')
|