Update app.py
Browse files
app.py
CHANGED
|
@@ -169,6 +169,12 @@ with tab1:
|
|
| 169 |
pass
|
| 170 |
projections['salary'] = projections['salary'].dropna().astype(int)
|
| 171 |
projections['ownership'] = projections['ownership'].astype(float)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
projections = projections.apply(lambda x: x.replace(player_wrong_names_mlb, player_right_names_mlb))
|
| 173 |
st.dataframe(projections.head(10))
|
| 174 |
|
|
|
|
| 169 |
pass
|
| 170 |
projections['salary'] = projections['salary'].dropna().astype(int)
|
| 171 |
projections['ownership'] = projections['ownership'].astype(float)
|
| 172 |
+
if type_var == 'Showdown':
|
| 173 |
+
if projections['captain ownership'].isna().all():
|
| 174 |
+
projections['captain ownership raw'] = (projections['ownership'] / 6) + projections['median']
|
| 175 |
+
ownership_var = projections['captain ownership raw'].sum() / 100
|
| 176 |
+
projections['captain ownership'] = projections['captain ownership raw'] * ownership_var
|
| 177 |
+
|
| 178 |
projections = projections.apply(lambda x: x.replace(player_wrong_names_mlb, player_right_names_mlb))
|
| 179 |
st.dataframe(projections.head(10))
|
| 180 |
|