Spaces:
Sleeping
Sleeping
Jon Solow
commited on
Commit
·
8f54194
1
Parent(s):
5a31ca8
Apply black
Browse files- src/pages/1_Keepers.py +8 -2
src/pages/1_Keepers.py
CHANGED
@@ -15,7 +15,9 @@ def load_player_ids() -> pd.DataFrame:
|
|
15 |
|
16 |
|
17 |
def load_adp() -> pd.DataFrame:
|
18 |
-
df = pd.read_csv(
|
|
|
|
|
19 |
df = df.loc[
|
20 |
df.fp_page == "/nfl/rankings/ppr-superflex-cheatsheets.php",
|
21 |
[
|
@@ -66,7 +68,11 @@ def load_data():
|
|
66 |
data = pd.read_csv(os.path.join(os.path.dirname(__file__), KEEPER_DATA_URL), index_col=0)
|
67 |
# Hack to get position, replace with better position from yahoo api in future
|
68 |
data["position"] = (
|
69 |
-
data["eligible_positions"]
|
|
|
|
|
|
|
|
|
70 |
)
|
71 |
data.columns = data.columns.str.lower()
|
72 |
data.sort_values(["team_name", "keeper_cost"], inplace=True)
|
|
|
15 |
|
16 |
|
17 |
def load_adp() -> pd.DataFrame:
|
18 |
+
df = pd.read_csv(
|
19 |
+
r"https://raw.githubusercontent.com/dynastyprocess/data/eb26796307b0cee1df237381ce59f5290846efec/files/db_fpecr_latest.csv"
|
20 |
+
)
|
21 |
df = df.loc[
|
22 |
df.fp_page == "/nfl/rankings/ppr-superflex-cheatsheets.php",
|
23 |
[
|
|
|
68 |
data = pd.read_csv(os.path.join(os.path.dirname(__file__), KEEPER_DATA_URL), index_col=0)
|
69 |
# Hack to get position, replace with better position from yahoo api in future
|
70 |
data["position"] = (
|
71 |
+
data["eligible_positions"]
|
72 |
+
.apply(lambda x: x.split(" ")[0])
|
73 |
+
.str.replace("[", "")
|
74 |
+
.str.replace("]", "")
|
75 |
+
.str.replace("'", "")
|
76 |
)
|
77 |
data.columns = data.columns.str.lower()
|
78 |
data.sort_values(["team_name", "keeper_cost"], inplace=True)
|