Spaces:
Running
Running
James McCool
commited on
Commit
·
43474bd
1
Parent(s):
c40ca3c
removing team abbrv
Browse files- src/streamlit_app.py +6 -6
src/streamlit_app.py
CHANGED
|
@@ -15,8 +15,8 @@ import certifi
|
|
| 15 |
ca = certifi.where()
|
| 16 |
from database import db
|
| 17 |
|
| 18 |
-
basic_cols = ['Player', 'Pos', 'Team', '
|
| 19 |
-
basic_season_cols = ['Pos', 'Team', '
|
| 20 |
data_cols = ['team_score', 'opp_score', 'spread', 'Touches', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M',
|
| 21 |
'FG3A', 'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
| 22 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
|
@@ -75,7 +75,7 @@ def init_baselines(data_req: str):
|
|
| 75 |
|
| 76 |
raw_display = pd.DataFrame(list(cursor))
|
| 77 |
gamelog_table = raw_display[raw_display['PLAYER_NAME'] != ""]
|
| 78 |
-
gamelog_table = gamelog_table[['PLAYER_NAME', 'POS', 'GAME_ID', 'TEAM_NAME', '
|
| 79 |
'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'reboundChancesOffensive', 'OREB', 'reboundChancesDefensive', 'DREB', 'reboundChancesTotal', 'REB',
|
| 80 |
'passes', 'secondaryAssists', 'freeThrowAssists', 'assists', 'STL', 'BLK', 'TOV', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy', 'FPPM']]
|
| 81 |
gamelog_table['assists'].replace("", 0, inplace=True)
|
|
@@ -109,7 +109,7 @@ def init_baselines(data_req: str):
|
|
| 109 |
|
| 110 |
spread_dict = dict(zip(gamelog_table['GAME_ID'], gamelog_table['spread']))
|
| 111 |
|
| 112 |
-
gamelog_table = gamelog_table.set_axis(['Player', 'Pos', 'game_id', 'Team', '
|
| 113 |
'FG3A', 'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
| 114 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy', 'FPPM',
|
| 115 |
'Rebound%', 'Assists/Pass', 'Touch_per_min', 'Fantasy/Touch', 'FD Fantasy/Touch', 'team_score', 'opp_score', 'spread'], axis=1)
|
|
@@ -121,7 +121,7 @@ def init_baselines(data_req: str):
|
|
| 121 |
|
| 122 |
raw_display = pd.DataFrame(list(cursor))
|
| 123 |
gamelog_table = raw_display[raw_display['PLAYER_NAME'] != ""]
|
| 124 |
-
gamelog_table = gamelog_table[['PLAYER_NAME', 'POS', 'GAME_ID', 'TEAM_NAME', '
|
| 125 |
'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'reboundChancesOffensive', 'OREB', 'reboundChancesDefensive', 'DREB', 'reboundChancesTotal', 'REB',
|
| 126 |
'passes', 'secondaryAssists', 'freeThrowAssists', 'assists', 'STL', 'BLK', 'TOV', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy', 'FPPM']]
|
| 127 |
gamelog_table['assists'].replace("", 0, inplace=True)
|
|
@@ -155,7 +155,7 @@ def init_baselines(data_req: str):
|
|
| 155 |
|
| 156 |
spread_dict = dict(zip(gamelog_table['GAME_ID'], gamelog_table['spread']))
|
| 157 |
|
| 158 |
-
gamelog_table = gamelog_table.set_axis(['Player', 'Pos', 'game_id', 'Team', '
|
| 159 |
'FG3A', 'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
| 160 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy', 'FPPM',
|
| 161 |
'Rebound%', 'Assists/Pass', 'Touch_per_min', 'Fantasy/Touch', 'FD Fantasy/Touch', 'team_score', 'opp_score', 'spread'], axis=1)
|
|
|
|
| 15 |
ca = certifi.where()
|
| 16 |
from database import db
|
| 17 |
|
| 18 |
+
basic_cols = ['Player', 'Pos', 'Team', 'Opp', 'Season', 'Date', 'Matchup', 'Min']
|
| 19 |
+
basic_season_cols = ['Pos', 'Team', 'Min']
|
| 20 |
data_cols = ['team_score', 'opp_score', 'spread', 'Touches', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M',
|
| 21 |
'FG3A', 'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
| 22 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy',
|
|
|
|
| 75 |
|
| 76 |
raw_display = pd.DataFrame(list(cursor))
|
| 77 |
gamelog_table = raw_display[raw_display['PLAYER_NAME'] != ""]
|
| 78 |
+
gamelog_table = gamelog_table[['PLAYER_NAME', 'POS', 'GAME_ID', 'TEAM_NAME', 'OPP_NAME', 'SEASON_ID', 'GAME_DATE', 'MATCHUP', 'MIN', 'touches', 'PTS', 'FGM', 'FGA', 'FG_PCT', 'FG3M', 'FG3A',
|
| 79 |
'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'reboundChancesOffensive', 'OREB', 'reboundChancesDefensive', 'DREB', 'reboundChancesTotal', 'REB',
|
| 80 |
'passes', 'secondaryAssists', 'freeThrowAssists', 'assists', 'STL', 'BLK', 'TOV', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy', 'FPPM']]
|
| 81 |
gamelog_table['assists'].replace("", 0, inplace=True)
|
|
|
|
| 109 |
|
| 110 |
spread_dict = dict(zip(gamelog_table['GAME_ID'], gamelog_table['spread']))
|
| 111 |
|
| 112 |
+
gamelog_table = gamelog_table.set_axis(['Player', 'Pos', 'game_id', 'Team', 'Opp', 'Season', 'Date', 'Matchup', 'Min', 'Touches', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M',
|
| 113 |
'FG3A', 'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
| 114 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy', 'FPPM',
|
| 115 |
'Rebound%', 'Assists/Pass', 'Touch_per_min', 'Fantasy/Touch', 'FD Fantasy/Touch', 'team_score', 'opp_score', 'spread'], axis=1)
|
|
|
|
| 121 |
|
| 122 |
raw_display = pd.DataFrame(list(cursor))
|
| 123 |
gamelog_table = raw_display[raw_display['PLAYER_NAME'] != ""]
|
| 124 |
+
gamelog_table = gamelog_table[['PLAYER_NAME', 'POS', 'GAME_ID', 'TEAM_NAME', 'OPP_NAME', 'SEASON_ID', 'GAME_DATE', 'MATCHUP', 'MIN', 'touches', 'PTS', 'FGM', 'FGA', 'FG_PCT', 'FG3M', 'FG3A',
|
| 125 |
'FG3_PCT', 'FTM', 'FTA', 'FT_PCT', 'reboundChancesOffensive', 'OREB', 'reboundChancesDefensive', 'DREB', 'reboundChancesTotal', 'REB',
|
| 126 |
'passes', 'secondaryAssists', 'freeThrowAssists', 'assists', 'STL', 'BLK', 'TOV', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy', 'FPPM']]
|
| 127 |
gamelog_table['assists'].replace("", 0, inplace=True)
|
|
|
|
| 155 |
|
| 156 |
spread_dict = dict(zip(gamelog_table['GAME_ID'], gamelog_table['spread']))
|
| 157 |
|
| 158 |
+
gamelog_table = gamelog_table.set_axis(['Player', 'Pos', 'game_id', 'Team', 'Opp', 'Season', 'Date', 'Matchup', 'Min', 'Touches', 'Pts', 'FGM', 'FGA', 'FG%', 'FG3M',
|
| 159 |
'FG3A', 'FG3%', 'FTM', 'FTA', 'FT%', 'OREB Chance', 'OREB', 'DREB Chance', 'DREB', 'REB Chance', 'REB',
|
| 160 |
'Passes', 'Alt Assists', 'FT Assists', 'Assists', 'Stl', 'Blk', 'Tov', 'PF', 'DD', 'TD', 'Fantasy', 'FD_Fantasy', 'FPPM',
|
| 161 |
'Rebound%', 'Assists/Pass', 'Touch_per_min', 'Fantasy/Touch', 'FD Fantasy/Touch', 'team_score', 'opp_score', 'spread'], axis=1)
|