Jon Solow commited on
Commit
ca30ea3
·
1 Parent(s): 8f54194

Fix position in my keepers too

Browse files
Files changed (1) hide show
  1. src/pages/2_My_Keepers.py +5 -1
src/pages/2_My_Keepers.py CHANGED
@@ -14,7 +14,11 @@ def load_data():
14
  data = pd.read_csv(os.path.join(os.path.dirname(__file__), KEEPER_DATA_URL), index_col=0)
15
  # Hack to get position, replace with better position from yahoo api in future
16
  data["position"] = (
17
- data["eligible_positions"].apply(lambda x: x.split(" ")[0]).replace("[", "").replace("]", "").replace("'", "")
 
 
 
 
18
  )
19
  data.columns = data.columns.str.lower()
20
  data.sort_values(["team_name", "keeper_cost"], inplace=True)
 
14
  data = pd.read_csv(os.path.join(os.path.dirname(__file__), KEEPER_DATA_URL), index_col=0)
15
  # Hack to get position, replace with better position from yahoo api in future
16
  data["position"] = (
17
+ data["eligible_positions"]
18
+ .apply(lambda x: x.split(" ")[0])
19
+ .str.replace("[", "")
20
+ .str.replace("]", "")
21
+ .str.replace("'", "")
22
  )
23
  data.columns = data.columns.str.lower()
24
  data.sort_values(["team_name", "keeper_cost"], inplace=True)