Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -726,7 +726,7 @@ with tab2:
|
|
726 |
# # Apply the calculation to the DataFrame
|
727 |
# 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)
|
728 |
# initial_proj['Own%'] = initial_proj['Own%'].clip(upper=85)
|
729 |
-
initial_proj['Own'] = initial_proj['Own
|
730 |
|
731 |
# Drop unnecessary columns and create the final DataFrame
|
732 |
Overall_Proj = initial_proj[['Player', 'Team', 'Position', 'Median', 'Own', 'Salary']]
|
|
|
726 |
# # Apply the calculation to the DataFrame
|
727 |
# 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)
|
728 |
# initial_proj['Own%'] = initial_proj['Own%'].clip(upper=85)
|
729 |
+
initial_proj['Own'] = initial_proj['Own'] * (900 / initial_proj['Own'].sum())
|
730 |
|
731 |
# Drop unnecessary columns and create the final DataFrame
|
732 |
Overall_Proj = initial_proj[['Player', 'Team', 'Position', 'Median', 'Own', 'Salary']]
|