Spaces:
Running
Running
James McCool
commited on
Commit
·
4bd52e5
1
Parent(s):
61d34da
Enhance data processing in app.py by converting percentage strings to float values for Win Percentage, Cover Spread Percentage, ML_Value, and Spread_Value. This ensures accurate calculations for betting models.
Browse files
app.py
CHANGED
@@ -101,6 +101,10 @@ def init_baselines():
|
|
101 |
worksheet = sh.worksheet('Game_Betting_Model')
|
102 |
raw_display = pd.DataFrame(worksheet.get_all_records())
|
103 |
team_frame = raw_display.drop_duplicates(subset='Names')
|
|
|
|
|
|
|
|
|
104 |
|
105 |
sh = gc.open_by_url(master_hold)
|
106 |
worksheet = sh.worksheet('prop_frame')
|
|
|
101 |
worksheet = sh.worksheet('Game_Betting_Model')
|
102 |
raw_display = pd.DataFrame(worksheet.get_all_records())
|
103 |
team_frame = raw_display.drop_duplicates(subset='Names')
|
104 |
+
team_frame['Win Percentage'] = team_frame['Win Percentage'].str.replace('%', '').astype('float')/100
|
105 |
+
team_frame['Cover Spread Percentage'] = team_frame['Cover Spread Percentage'].str.replace('%', '').astype('float')/100
|
106 |
+
team_frame['ML_Value'] = team_frame['ML_Value'].str.replace('%', '').astype('float')/100
|
107 |
+
team_frame['Spread_Value'] = team_frame['Spread_Value'].str.replace('%', '').astype('float')/100
|
108 |
|
109 |
sh = gc.open_by_url(master_hold)
|
110 |
worksheet = sh.worksheet('prop_frame')
|