Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -54,13 +54,12 @@ def init_baselines():
|
|
54 |
'FD_Salary', 'FD_Avg_Val', 'FD_Ceiling_Value']]
|
55 |
trend_table['DK_Salary'] = trend_table['DK_Salary'].str.replace(',', '').astype(float)
|
56 |
trend_table['FD_Salary'] = trend_table['FD_Salary'].str.replace(',', '').astype(float)
|
57 |
-
|
|
|
58 |
|
59 |
dk_minutes_table = trend_table[['PLAYER_NAME', 'Team', 'L10 MIN', 'L5 MIN', 'L3 MIN', 'Trend Min']]
|
60 |
-
dk_minutes_table.iloc[:,2:] = dk_minutes_table.iloc[:,2:].apply(pd.to_numeric)
|
61 |
|
62 |
fd_minutes_table = trend_table[['PLAYER_NAME', 'Team', 'L10 MIN', 'L5 MIN', 'L3 MIN', 'Trend Min']]
|
63 |
-
fd_minutes_table.iloc[:,2:] = fd_minutes_table.iloc[:,2:].apply(pd.to_numeric)
|
64 |
|
65 |
dk_medians_table = trend_table[['PLAYER_NAME', 'Team', 'L10 Fantasy', 'L5 Fantasy', 'L3 Fantasy', 'Trend Median']]
|
66 |
|
|
|
54 |
'FD_Salary', 'FD_Avg_Val', 'FD_Ceiling_Value']]
|
55 |
trend_table['DK_Salary'] = trend_table['DK_Salary'].str.replace(',', '').astype(float)
|
56 |
trend_table['FD_Salary'] = trend_table['FD_Salary'].str.replace(',', '').astype(float)
|
57 |
+
cols = trend_table.columns.drop(['PLAYER_NAME', 'Team', 'Position', 'FD_Position'])
|
58 |
+
trend_table.iloc[:,4:] = trend_table.iloc[:,4:].apply(pd.to_numeric, errors='coerce')
|
59 |
|
60 |
dk_minutes_table = trend_table[['PLAYER_NAME', 'Team', 'L10 MIN', 'L5 MIN', 'L3 MIN', 'Trend Min']]
|
|
|
61 |
|
62 |
fd_minutes_table = trend_table[['PLAYER_NAME', 'Team', 'L10 MIN', 'L5 MIN', 'L3 MIN', 'Trend Min']]
|
|
|
63 |
|
64 |
dk_medians_table = trend_table[['PLAYER_NAME', 'Team', 'L10 Fantasy', 'L5 Fantasy', 'L3 Fantasy', 'Trend Median']]
|
65 |
|