Spaces:
Running
Running
James McCool
commited on
Commit
·
b7994bd
1
Parent(s):
9fc32b1
Oops
Browse files- src/streamlit_app.py +10 -10
src/streamlit_app.py
CHANGED
|
@@ -135,21 +135,21 @@ def init_macro_tables():
|
|
| 135 |
team_off_frame = team_off_frame.reset_index(drop=True)
|
| 136 |
team_off_frame = team_off_frame.drop(columns=['PLUS_MINUS', 'PF', 'Data'], axis=1)
|
| 137 |
team_off_frame = team_off_frame.apply(pd.to_numeric, errors='coerce').fillna(team_off_frame)
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
|
| 144 |
team_def_frame = team_macro_frame[team_macro_frame['Data'] == 'Def']
|
| 145 |
team_def_frame = team_def_frame.reset_index(drop=True)
|
| 146 |
team_off_frame = team_off_frame.drop(columns=['PLUS_MINUS', 'PF', 'Data'], axis=1)
|
| 147 |
team_def_frame = team_def_frame.apply(pd.to_numeric, errors='coerce').fillna(team_def_frame)
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
|
| 154 |
team_combo_json = requests.get(NBA_DATA + '?sheet=Team%20Combo%20Data').json()
|
| 155 |
team_combo_frame = pd.DataFrame(team_combo_json)
|
|
|
|
| 135 |
team_off_frame = team_off_frame.reset_index(drop=True)
|
| 136 |
team_off_frame = team_off_frame.drop(columns=['PLUS_MINUS', 'PF', 'Data'], axis=1)
|
| 137 |
team_off_frame = team_off_frame.apply(pd.to_numeric, errors='coerce').fillna(team_off_frame)
|
| 138 |
+
team_off_frame['PTS/m'] = team_off_frame['PTS'] / team_off_frame['MIN']
|
| 139 |
+
team_off_frame['REB/m'] = team_off_frame['REB'] / team_off_frame['MIN']
|
| 140 |
+
team_off_frame['AST/m'] = team_off_frame['AST'] / team_off_frame['MIN']
|
| 141 |
+
team_off_frame['STL/m'] = team_off_frame['STL'] / team_off_frame['MIN']
|
| 142 |
+
team_off_frame['BLK/m'] = team_off_frame['BLK'] / team_off_frame['MIN']
|
| 143 |
|
| 144 |
team_def_frame = team_macro_frame[team_macro_frame['Data'] == 'Def']
|
| 145 |
team_def_frame = team_def_frame.reset_index(drop=True)
|
| 146 |
team_off_frame = team_off_frame.drop(columns=['PLUS_MINUS', 'PF', 'Data'], axis=1)
|
| 147 |
team_def_frame = team_def_frame.apply(pd.to_numeric, errors='coerce').fillna(team_def_frame)
|
| 148 |
+
team_def_frame['PTS/m'] = team_def_frame['PTS'] / team_def_frame['MIN']
|
| 149 |
+
team_def_frame['REB/m'] = team_def_frame['REB'] / team_def_frame['MIN']
|
| 150 |
+
team_def_frame['AST/m'] = team_def_frame['AST'] / team_def_frame['MIN']
|
| 151 |
+
team_def_frame['STL/m'] = team_def_frame['STL'] / team_def_frame['MIN']
|
| 152 |
+
team_def_frame['BLK/m'] = team_def_frame['BLK'] / team_def_frame['MIN']
|
| 153 |
|
| 154 |
team_combo_json = requests.get(NBA_DATA + '?sheet=Team%20Combo%20Data').json()
|
| 155 |
team_combo_frame = pd.DataFrame(team_combo_json)
|