Spaces:
Running
Running
James McCool
commited on
Commit
·
6fa8eec
1
Parent(s):
68b8a20
Update scoring percentages in app.py to convert percentage strings to decimal format for '8+ runs' and 'Win Percentage', enhancing data accuracy and consistency.
Browse files
app.py
CHANGED
@@ -81,8 +81,8 @@ def init_baselines():
|
|
81 |
team_frame = pd.DataFrame(cursor)
|
82 |
scoring_percentages = team_frame.drop(columns=['_id'])
|
83 |
scoring_percentages = scoring_percentages[['Names', 'Avg First Inning', 'First Inning Lead Percentage', 'Avg Fifth Inning', 'Fifth Inning Lead Percentage', 'Avg Score', '8+ runs', 'Win Percentage']]
|
84 |
-
scoring_percentages['8+ runs'] = scoring_percentages['8+ runs'].replace('%', '', regex=True).astype(float)
|
85 |
-
scoring_percentages['Win Percentage'] = scoring_percentages['Win Percentage'].replace('%', '', regex=True).astype(float)
|
86 |
|
87 |
return roo_data, sd_roo_data, scoring_percentages
|
88 |
|
|
|
81 |
team_frame = pd.DataFrame(cursor)
|
82 |
scoring_percentages = team_frame.drop(columns=['_id'])
|
83 |
scoring_percentages = scoring_percentages[['Names', 'Avg First Inning', 'First Inning Lead Percentage', 'Avg Fifth Inning', 'Fifth Inning Lead Percentage', 'Avg Score', '8+ runs', 'Win Percentage']]
|
84 |
+
scoring_percentages['8+ runs'] = scoring_percentages['8+ runs'].replace('%', '', regex=True).astype(float) / 100
|
85 |
+
scoring_percentages['Win Percentage'] = scoring_percentages['Win Percentage'].replace('%', '', regex=True).astype(float) / 100
|
86 |
|
87 |
return roo_data, sd_roo_data, scoring_percentages
|
88 |
|