Spaces:
Sleeping
Sleeping
James McCool
commited on
Commit
·
8babaae
1
Parent(s):
87cd098
Update player data columns in init_baselines function to include additional statistics and rename 'Player' to 'name' for consistency. This enhances data representation and aligns with updated data sources.
Browse files- src/streamlit_app.py +3 -2
src/streamlit_app.py
CHANGED
|
@@ -145,8 +145,9 @@ def init_baselines(type_var: str):
|
|
| 145 |
cursor = collection.find()
|
| 146 |
|
| 147 |
raw_display = pd.DataFrame(list(cursor))
|
| 148 |
-
raw_display = raw_display[['
|
| 149 |
-
|
|
|
|
| 150 |
player_stats = raw_display[raw_display['Position'] != 'K']
|
| 151 |
|
| 152 |
if type_var == 'Regular':
|
|
|
|
| 145 |
cursor = collection.find()
|
| 146 |
|
| 147 |
raw_display = pd.DataFrame(list(cursor))
|
| 148 |
+
raw_display = raw_display[['name', 'Team', 'Opp', 'Position', 'Salary', 'team_plays', 'team_pass', 'team_rush', 'team_tds', 'team_pass_tds', 'team_rush_tds', 'dropbacks', 'pass_yards', 'pass_tds',
|
| 149 |
+
'rush_att', 'rush_yards', 'rush_tds', 'targets', 'rec', 'rec_yards', 'rec_tds', 'PPR', 'Half_PPR', 'Own']]
|
| 150 |
+
raw_display['name'] = raw_display['name'].map(dict(zip(wrong_team_names, right_name_teams)), na_action='ignore').fillna(raw_display['name'])
|
| 151 |
player_stats = raw_display[raw_display['Position'] != 'K']
|
| 152 |
|
| 153 |
if type_var == 'Regular':
|