Spaces:
Sleeping
Sleeping
Jon Solow
commited on
Commit
·
f5c14f1
1
Parent(s):
297c9c5
Fix Eligible as checkbox and Years Eligible as number
Browse files- src/pages/1_Keepers.py +3 -3
src/pages/1_Keepers.py
CHANGED
@@ -26,7 +26,7 @@ def add_opinionated_keeper_value(df: pd.DataFrame):
|
|
26 |
df[f"value_{score_fmt}"] = (df["keeper_cost"] - 0.5) * LEAGUE_NUMBER_TEAMS - df[f"ecr_{score_fmt}"]
|
27 |
|
28 |
|
29 |
-
@st.cache_data(ttl=60*60*24)
|
30 |
def load_data():
|
31 |
data = pd.read_csv(os.path.join(os.path.dirname(__file__), KEEPER_DATA_URL), index_col=0)
|
32 |
# Hack to get position, replace with better position from yahoo api in future
|
@@ -101,8 +101,8 @@ def filtered_keeper_dataframe(data: pd.DataFrame, teams_list: list[str]):
|
|
101 |
"keeper_cost": st.column_config.NumberColumn(
|
102 |
label="Keeper Cost", help="Draft Round Cost to keep player. See Rules for details."
|
103 |
),
|
104 |
-
"eligible": st.column_config.
|
105 |
-
"years_eligible": st.column_config.
|
106 |
label="Years Eligible",
|
107 |
help="Number of further consecutive seasons player can be kept (subject to maximum of 2)",
|
108 |
),
|
|
|
26 |
df[f"value_{score_fmt}"] = (df["keeper_cost"] - 0.5) * LEAGUE_NUMBER_TEAMS - df[f"ecr_{score_fmt}"]
|
27 |
|
28 |
|
29 |
+
@st.cache_data(ttl=60 * 60 * 24)
|
30 |
def load_data():
|
31 |
data = pd.read_csv(os.path.join(os.path.dirname(__file__), KEEPER_DATA_URL), index_col=0)
|
32 |
# Hack to get position, replace with better position from yahoo api in future
|
|
|
101 |
"keeper_cost": st.column_config.NumberColumn(
|
102 |
label="Keeper Cost", help="Draft Round Cost to keep player. See Rules for details."
|
103 |
),
|
104 |
+
"eligible": st.column_config.CheckboxColumn(label="Eligible", help="Is player eligible to be keeper?"),
|
105 |
+
"years_eligible": st.column_config.NumberColumn(
|
106 |
label="Years Eligible",
|
107 |
help="Number of further consecutive seasons player can be kept (subject to maximum of 2)",
|
108 |
),
|