Spaces:
Sleeping
Sleeping
James McCool
commited on
Commit
·
5a272b3
1
Parent(s):
e42fc82
Enhance dupes calculation in app.py to ensure non-negative values. Introduced a conditional adjustment for the 'Dupes' metric, setting it to zero when the calculated dupes are less than or equal to zero. This change improves the accuracy and reliability of player ownership analysis and contest lineup simulations.
Browse files
app.py
CHANGED
@@ -620,6 +620,11 @@ with tab1:
|
|
620 |
)
|
621 |
Sim_Winner_Frame['Dupes'] = (Sim_Winner_Frame['Dupes'] * (500000 / sharp_split)) / 2
|
622 |
Sim_Winner_Frame['Dupes'] = np.round(Sim_Winner_Frame['Dupes'], 0)
|
|
|
|
|
|
|
|
|
|
|
623 |
Sim_Winner_Frame = Sim_Winner_Frame.drop(columns=dup_count_columns)
|
624 |
Sim_Winner_Frame = Sim_Winner_Frame.drop(columns=own_columns)
|
625 |
Sim_Winner_Frame = Sim_Winner_Frame.drop(columns=calc_columns)
|
|
|
620 |
)
|
621 |
Sim_Winner_Frame['Dupes'] = (Sim_Winner_Frame['Dupes'] * (500000 / sharp_split)) / 2
|
622 |
Sim_Winner_Frame['Dupes'] = np.round(Sim_Winner_Frame['Dupes'], 0)
|
623 |
+
Sim_Winner_Frame['Dupes'] = np.where(
|
624 |
+
np.round(Sim_Winner_Frame['dupes_calc'], 0) <= 0,
|
625 |
+
0,
|
626 |
+
np.round(Sim_Winner_Frame['dupes_calc'], 0)
|
627 |
+
)
|
628 |
Sim_Winner_Frame = Sim_Winner_Frame.drop(columns=dup_count_columns)
|
629 |
Sim_Winner_Frame = Sim_Winner_Frame.drop(columns=own_columns)
|
630 |
Sim_Winner_Frame = Sim_Winner_Frame.drop(columns=calc_columns)
|