Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -124,7 +124,9 @@ def init_baselines():
|
|
124 |
cell_vals = [row[0:29] for row in all_values[1:500]]
|
125 |
frame_hold = pd.DataFrame(cell_vals, columns=['Team', 'Opp', 'd1', 'd2', 'Game Stack', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd9', 'd10', 'd11', 'd12', 'd13', 'd14', 'Team Stack',
|
126 |
'15', '16', '17', '18', '19', '20', '21', 'Total Stack Cost', 'Total Own', 'Total Points', 'Points/$'])
|
|
|
127 |
stack_frame = frame_hold[['Team', 'Opp', 'Game Stack', 'Team Stack', 'Total Stack Cost', 'Total Own', 'Total Points', 'Points/$']]
|
|
|
128 |
string_cols = ['Team', 'Opp']
|
129 |
stack_frame = stack_frame.drop_duplicates(subset='Team')
|
130 |
stack_frame = stack_frame.set_index('Team')
|
|
|
124 |
cell_vals = [row[0:29] for row in all_values[1:500]]
|
125 |
frame_hold = pd.DataFrame(cell_vals, columns=['Team', 'Opp', 'd1', 'd2', 'Game Stack', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd9', 'd10', 'd11', 'd12', 'd13', 'd14', 'Team Stack',
|
126 |
'15', '16', '17', '18', '19', '20', '21', 'Total Stack Cost', 'Total Own', 'Total Points', 'Points/$'])
|
127 |
+
frame_hold['Total Own'] = frame_hold['Total Own'].str.replace('%', '').astype(float)/100
|
128 |
stack_frame = frame_hold[['Team', 'Opp', 'Game Stack', 'Team Stack', 'Total Stack Cost', 'Total Own', 'Total Points', 'Points/$']]
|
129 |
+
|
130 |
string_cols = ['Team', 'Opp']
|
131 |
stack_frame = stack_frame.drop_duplicates(subset='Team')
|
132 |
stack_frame = stack_frame.set_index('Team')
|