Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -226,8 +226,8 @@ season_data_cols = ['Touches', 'Touch/Min', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M',
|
|
226 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
227 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
228 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
229 |
-
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
230 |
-
'
|
231 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
232 |
total_teams = indv_teams.Team.values.tolist()
|
233 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
@@ -257,8 +257,8 @@ with tab1:
|
|
257 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
258 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
259 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
260 |
-
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
261 |
-
'
|
262 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
263 |
total_teams = indv_teams.Team.values.tolist()
|
264 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
@@ -386,8 +386,8 @@ with tab2:
|
|
386 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
387 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
388 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
389 |
-
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
390 |
-
'
|
391 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
392 |
total_teams = indv_teams.Team.values.tolist()
|
393 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
@@ -481,8 +481,8 @@ with tab3:
|
|
481 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
482 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
483 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
484 |
-
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
485 |
-
'
|
486 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
487 |
total_teams = indv_teams.Team.values.tolist()
|
488 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
@@ -568,8 +568,8 @@ with tab4:
|
|
568 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
569 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
570 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
571 |
-
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
572 |
-
'
|
573 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
574 |
total_teams = indv_teams.Team.values.tolist()
|
575 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
@@ -619,8 +619,8 @@ with tab5:
|
|
619 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
620 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
621 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
622 |
-
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
623 |
-
'
|
624 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
625 |
total_teams = indv_teams.Team.values.tolist()
|
626 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
@@ -699,7 +699,7 @@ with tab5:
|
|
699 |
fig.add_vline(x=36, line_width=3, line_dash="dash", line_color="green")
|
700 |
# pages = pages.set_index('Player')
|
701 |
display.plotly_chart(fig, use_container_width=True)
|
702 |
-
stats_disp.dataframe(game_rot_stats.style.format(precision=2), use_container_width = True)
|
703 |
|
704 |
elif game_rot_view == 'Team Rotations':
|
705 |
team_backlog = game_rot[game_rot['TEAM_ABBREVIATION'] == game_rot_team]
|
@@ -728,4 +728,4 @@ with tab5:
|
|
728 |
fig.add_vline(x=36, line_width=3, line_dash="dash", line_color="green")
|
729 |
# pages = pages.set_index('Player')
|
730 |
display.plotly_chart(fig, use_container_width=True)
|
731 |
-
stats_disp.dataframe(game_rot_stats.style.format(precision=2), use_container_width = True)
|
|
|
226 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
227 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
228 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
229 |
+
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'spread', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
230 |
+
'Fantasy', 'FD_Fantasy']
|
231 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
232 |
total_teams = indv_teams.Team.values.tolist()
|
233 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
|
|
257 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
258 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
259 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
260 |
+
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'spread', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
261 |
+
'Fantasy', 'FD_Fantasy']
|
262 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
263 |
total_teams = indv_teams.Team.values.tolist()
|
264 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
|
|
386 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
387 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
388 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
389 |
+
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'spread', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
390 |
+
'Fantasy', 'FD_Fantasy']
|
391 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
392 |
total_teams = indv_teams.Team.values.tolist()
|
393 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
|
|
481 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
482 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
483 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
484 |
+
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'spread', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
485 |
+
'Fantasy', 'FD_Fantasy']
|
486 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
487 |
total_teams = indv_teams.Team.values.tolist()
|
488 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
|
|
568 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
569 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
570 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
571 |
+
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'spread', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
572 |
+
'Fantasy', 'FD_Fantasy']
|
573 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
574 |
total_teams = indv_teams.Team.values.tolist()
|
575 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
|
|
619 |
'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
620 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
621 |
'Rebound%', 'Assists/Pass', 'Fantasy/Touch', 'FD Fantasy/Touch']
|
622 |
+
game_rot_cols = ['PLAYER_NAME', 'backlog_lookup', 'spread', 'MIN', 'PTS', 'FGM', 'FGA', 'FG3M', 'FG3A', 'FTM', 'FTA', 'REB', 'AST', 'STL', 'BLK', 'TOV', 'PF',
|
623 |
+
'Fantasy', 'FD_Fantasy']
|
624 |
indv_teams = gamelog_table.drop_duplicates(subset='Team')
|
625 |
total_teams = indv_teams.Team.values.tolist()
|
626 |
indv_rot_teams = rot_table.drop_duplicates(subset='Team')
|
|
|
699 |
fig.add_vline(x=36, line_width=3, line_dash="dash", line_color="green")
|
700 |
# pages = pages.set_index('Player')
|
701 |
display.plotly_chart(fig, use_container_width=True)
|
702 |
+
stats_disp.dataframe(game_rot_stats.style.format(precision=2), hide_index=True, use_container_width = True)
|
703 |
|
704 |
elif game_rot_view == 'Team Rotations':
|
705 |
team_backlog = game_rot[game_rot['TEAM_ABBREVIATION'] == game_rot_team]
|
|
|
728 |
fig.add_vline(x=36, line_width=3, line_dash="dash", line_color="green")
|
729 |
# pages = pages.set_index('Player')
|
730 |
display.plotly_chart(fig, use_container_width=True)
|
731 |
+
stats_disp.dataframe(game_rot_stats.style.format(precision=2), hide_index=True, use_container_width = True)
|