Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -433,6 +433,7 @@ def get_uncorrelated_portfolio_for_sim(Total_Sample_Size, sharp_split, field_gro
|
|
433 |
tab1, tab2 = st.tabs(['Uploads', 'Contest Sim'])
|
434 |
|
435 |
with tab1:
|
|
|
436 |
with st.container():
|
437 |
col1, col2 = st.columns([3, 3])
|
438 |
|
@@ -704,7 +705,7 @@ with tab2:
|
|
704 |
# # Apply the calculation to the DataFrame
|
705 |
# initial_proj['Own%'] = initial_proj.apply(lambda row: calculate_own(row['Position'], row['Own'], initial_proj.loc[initial_proj['Position'] == row['Position'], 'Own'].mean(), factor_c if row['Position'] == 'C' else factor_other), axis=1)
|
706 |
# initial_proj['Own%'] = initial_proj['Own%'].clip(upper=85)
|
707 |
-
initial_proj['Own'] = initial_proj['Own
|
708 |
|
709 |
# Drop unnecessary columns and create the final DataFrame
|
710 |
Overall_Proj = initial_proj[['Player', 'Team', 'Position', 'Median', 'Own', 'Salary']]
|
|
|
433 |
tab1, tab2 = st.tabs(['Uploads', 'Contest Sim'])
|
434 |
|
435 |
with tab1:
|
436 |
+
st.info("The contest sim currently only works for Draftkings, the roster formation for Fanduel is incorrect. It'll be fixed in the next couple of days!")
|
437 |
with st.container():
|
438 |
col1, col2 = st.columns([3, 3])
|
439 |
|
|
|
705 |
# # Apply the calculation to the DataFrame
|
706 |
# initial_proj['Own%'] = initial_proj.apply(lambda row: calculate_own(row['Position'], row['Own'], initial_proj.loc[initial_proj['Position'] == row['Position'], 'Own'].mean(), factor_c if row['Position'] == 'C' else factor_other), axis=1)
|
707 |
# initial_proj['Own%'] = initial_proj['Own%'].clip(upper=85)
|
708 |
+
initial_proj['Own'] = initial_proj['Own'] * (900 / initial_proj['Own'].sum())
|
709 |
|
710 |
# Drop unnecessary columns and create the final DataFrame
|
711 |
Overall_Proj = initial_proj[['Player', 'Team', 'Position', 'Median', 'Own', 'Salary']]
|