Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -314,14 +314,6 @@ with col2:
|
|
314 |
hitter_stats['Acro'] = hitter_stats['Team']
|
315 |
hitter_stats.replace('', np.nan, inplace=True)
|
316 |
hitter_stats = hitter_stats.dropna(subset=['Opp'])
|
317 |
-
hitter_stats['8+ For'] = hitter_stats['8+ For'].str.replace('%', '').astype(float)/100
|
318 |
-
hitter_stats['8+ For L5'] = hitter_stats['8+ For L5'].str.replace('%', '').astype(float)/100
|
319 |
-
hitter_stats['8+ For L10'] = hitter_stats['8+ For L10'].str.replace('%', '').astype(float)/100
|
320 |
-
hitter_stats['Trending 8+ For'] = hitter_stats['Trending 8+ For'].str.replace('%', '').astype(float)/100
|
321 |
-
hitter_stats['8+ Allowed'] = hitter_stats['8+ Allowed'].str.replace('%', '').astype(float)/100
|
322 |
-
hitter_stats['8+ Allowed L5'] = hitter_stats['8+ Allowed L5'].str.replace('%', '').astype(float)/100
|
323 |
-
hitter_stats['8+ Allowed L10'] = hitter_stats['8+ Allowed L10'].str.replace('%', '').astype(float)/100
|
324 |
-
hitter_stats['Trending 8+ Allowed'] = hitter_stats['Trending 8+ Allowed'].str.replace('%', '').astype(float)/100
|
325 |
hitter_stats = hitter_stats[['Team', 'Opp', 'Avg Score', 'Avg Score L5', 'Avg Score L10', 'Trending Score', '8+ For', '8+ For L5', '8+ For L10', 'Trending 8+ For', 'Acro']]
|
326 |
hitter_stats = hitter_stats.sort_values(by='Trending Score', ascending=False)
|
327 |
hitter_stats = hitter_stats.set_index('Team')
|
@@ -335,14 +327,6 @@ with col2:
|
|
335 |
hitter_stats['Acro'] = hitter_stats['Team']
|
336 |
hitter_stats.replace('', np.nan, inplace=True)
|
337 |
hitter_stats = hitter_stats.dropna(subset=['Opp'])
|
338 |
-
hitter_stats['8+ For'] = hitter_stats['8+ For'].str.replace('%', '').astype(float)/100
|
339 |
-
hitter_stats['8+ For L5'] = hitter_stats['8+ For L5'].str.replace('%', '').astype(float)/100
|
340 |
-
hitter_stats['8+ For L10'] = hitter_stats['8+ For L10'].str.replace('%', '').astype(float)/100
|
341 |
-
hitter_stats['Trending 8+ For'] = hitter_stats['Trending 8+ For'].str.replace('%', '').astype(float)/100
|
342 |
-
hitter_stats['8+ Allowed'] = hitter_stats['8+ Allowed'].str.replace('%', '').astype(float)/100
|
343 |
-
hitter_stats['8+ Allowed L5'] = hitter_stats['8+ Allowed L5'].str.replace('%', '').astype(float)/100
|
344 |
-
hitter_stats['8+ Allowed L10'] = hitter_stats['8+ Allowed L10'].str.replace('%', '').astype(float)/100
|
345 |
-
hitter_stats['Trending 8+ Allowed'] = hitter_stats['Trending 8+ Allowed'].str.replace('%', '').astype(float)/100
|
346 |
hitter_stats = hitter_stats[['Team', 'Opp', 'Avg Allowed', 'Avg Allowed L5', 'Avg Allowed L10', 'Trending Avg Allowed', '8+ Allowed', '8+ Allowed L5', '8+ Allowed L10', 'Trending 8+ Allowed', 'Acro']]
|
347 |
hitter_stats = hitter_stats.sort_values(by='Trending Avg Allowed', ascending=False)
|
348 |
hitter_stats = hitter_stats.set_index('Team')
|
@@ -356,11 +340,6 @@ with col2:
|
|
356 |
hitter_stats['Acro'] = hitter_stats['Team']
|
357 |
hitter_stats.replace('', np.nan, inplace=True)
|
358 |
hitter_stats = hitter_stats.dropna(subset=['Opp'])
|
359 |
-
hitter_stats['R2_to_Opp_szn'] = hitter_stats['R2_to_Opp_szn'].str.replace('%', '').astype(float)/100
|
360 |
-
hitter_stats['R2_to_Opp_sample'] = hitter_stats['R2_to_Opp_sample'].str.replace('%', '').astype(float)/100
|
361 |
-
hitter_stats['R2_to_Opp L5'] = hitter_stats['R2_to_Opp L5'].str.replace('%', '').astype(float)/100
|
362 |
-
hitter_stats['R2_to_Opp L10'] = hitter_stats['R2_to_Opp L10'].str.replace('%', '').astype(float)/100
|
363 |
-
hitter_stats['R2_to_Opp_Trend'] = hitter_stats['R2_to_Opp_Trend'].str.replace('%', '').astype(float)/100
|
364 |
hitter_stats = hitter_stats[['Team', 'Opp', 'Avg Score', 'Avg Score L5', 'Avg Score L10', 'Trending Score', 'R2_to_Opp_szn', 'R2_to_Opp_sample', 'R2_to_Opp L5', 'R2_to_Opp L10', 'R2_to_Opp_Trend', 'Acro']]
|
365 |
hitter_stats = hitter_stats.sort_values(by='R2_to_Opp_Trend', ascending=False)
|
366 |
hitter_stats = hitter_stats.set_index('Team')
|
|
|
314 |
hitter_stats['Acro'] = hitter_stats['Team']
|
315 |
hitter_stats.replace('', np.nan, inplace=True)
|
316 |
hitter_stats = hitter_stats.dropna(subset=['Opp'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
hitter_stats = hitter_stats[['Team', 'Opp', 'Avg Score', 'Avg Score L5', 'Avg Score L10', 'Trending Score', '8+ For', '8+ For L5', '8+ For L10', 'Trending 8+ For', 'Acro']]
|
318 |
hitter_stats = hitter_stats.sort_values(by='Trending Score', ascending=False)
|
319 |
hitter_stats = hitter_stats.set_index('Team')
|
|
|
327 |
hitter_stats['Acro'] = hitter_stats['Team']
|
328 |
hitter_stats.replace('', np.nan, inplace=True)
|
329 |
hitter_stats = hitter_stats.dropna(subset=['Opp'])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
hitter_stats = hitter_stats[['Team', 'Opp', 'Avg Allowed', 'Avg Allowed L5', 'Avg Allowed L10', 'Trending Avg Allowed', '8+ Allowed', '8+ Allowed L5', '8+ Allowed L10', 'Trending 8+ Allowed', 'Acro']]
|
331 |
hitter_stats = hitter_stats.sort_values(by='Trending Avg Allowed', ascending=False)
|
332 |
hitter_stats = hitter_stats.set_index('Team')
|
|
|
340 |
hitter_stats['Acro'] = hitter_stats['Team']
|
341 |
hitter_stats.replace('', np.nan, inplace=True)
|
342 |
hitter_stats = hitter_stats.dropna(subset=['Opp'])
|
|
|
|
|
|
|
|
|
|
|
343 |
hitter_stats = hitter_stats[['Team', 'Opp', 'Avg Score', 'Avg Score L5', 'Avg Score L10', 'Trending Score', 'R2_to_Opp_szn', 'R2_to_Opp_sample', 'R2_to_Opp L5', 'R2_to_Opp L10', 'R2_to_Opp_Trend', 'Acro']]
|
344 |
hitter_stats = hitter_stats.sort_values(by='R2_to_Opp_Trend', ascending=False)
|
345 |
hitter_stats = hitter_stats.set_index('Team')
|