Spaces:
Sleeping
Sleeping
Jon Solow
commited on
Commit
·
bcf81ec
1
Parent(s):
2a129b1
Get partial fix in for position
Browse files- src/pages/1_Keepers.py +1 -1
src/pages/1_Keepers.py
CHANGED
@@ -68,7 +68,7 @@ def add_opinionated_keeper_value(df: pd.DataFrame):
|
|
68 |
def load_data():
|
69 |
data = pd.read_csv(os.path.join(os.path.dirname(__file__), KEEPER_DATA_URL), index_col=0)
|
70 |
# Hack to get position, replace with better position from yahoo api in future
|
71 |
-
data["position"] = data["eligible_positions"].apply(lambda x:
|
72 |
data.columns = data.columns.str.lower()
|
73 |
data.sort_values(["team_name", "keeper_cost"], inplace=True)
|
74 |
teams_list = sorted(list(data["team_name"].unique()))
|
|
|
68 |
def load_data():
|
69 |
data = pd.read_csv(os.path.join(os.path.dirname(__file__), KEEPER_DATA_URL), index_col=0)
|
70 |
# Hack to get position, replace with better position from yahoo api in future
|
71 |
+
data["position"] = data["eligible_positions"].apply(lambda x: x.split(" ")[0]).replace("[", "").replace("]", "").replace("'", "")
|
72 |
data.columns = data.columns.str.lower()
|
73 |
data.sort_values(["team_name", "keeper_cost"], inplace=True)
|
74 |
teams_list = sorted(list(data["team_name"].unique()))
|