Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -49,8 +49,23 @@ sim_all_hold = pd.DataFrame(columns=['Player', 'Prop type', 'Prop', 'Mean_Outcom
|
|
49 |
def add_column(df):
|
50 |
return_df = df
|
51 |
return_df['2P'] = return_df["Minutes"] * return_df["FG2M"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
|
|
|
|
|
54 |
|
55 |
@st.cache_resource(ttl = 299)
|
56 |
def init_baselines():
|
|
|
49 |
def add_column(df):
|
50 |
return_df = df
|
51 |
return_df['2P'] = return_df["Minutes"] * return_df["FG2M"]
|
52 |
+
return_df['3P'] = return_df["Minutes"] * return_df["Threes"]
|
53 |
+
return_df['FT'] = return_df["Minutes"] * return_df["FTM"]
|
54 |
+
return_df['Points'] = (return_df["2P"] * 2) + (return_df["3P"] * 3) + return_df['FT']
|
55 |
+
return_df['Rebounds'] = return_df["Minutes"] * return_df["TRB"]
|
56 |
+
return_df['Assists'] = return_df["Minutes"] * return_df["AST"]
|
57 |
+
return_df['PRA'] = return_df['Points'] + return_df['Rebounds'] + return_df['Assists']
|
58 |
+
return_df['PR'] = return_df['Points'] + return_df['Rebounds']
|
59 |
+
return_df['PA'] = return_df['Points'] + return_df['Assists']
|
60 |
+
return_df['RA'] = return_df['Rebounds'] + return_df['Assists']
|
61 |
+
return_df['Steals'] = return_df["Minutes"] * return_df["STL"]
|
62 |
+
return_df['Blocks'] = return_df["Minutes"] * return_df["BLK"]
|
63 |
+
return_df['Turnovers'] = return_df["Minutes"] * return_df["TOV"]
|
64 |
+
return_df['Fantasy'] = (return_df["2P"] * 1) + (return_df["3P"] * .5) + return_df['FT'] + (return_df["Rebounds"] * 1.25) + (return_df["Assists"] * 1.5) + (return_df["Steals"] * 2) + (return_df["Blocks"] * 2) + (return_df["Turnovers"] * -.5)
|
65 |
|
66 |
+
export_df = return_df[['2P', '3P', 'FT', 'Points', 'Rebounds', 'Assists', 'PRA', 'PR', 'PA', 'RA', 'Steals', 'Blocks', 'Turnovers', 'Fantasy']]
|
67 |
+
|
68 |
+
return export_df
|
69 |
|
70 |
@st.cache_resource(ttl = 299)
|
71 |
def init_baselines():
|