James McCool commited on
Commit
7094bdb
·
1 Parent(s): 46ed57c

Fix case sensitivity in database collection names for Draftkings and Fanduel in app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -48,7 +48,7 @@ def init_DK_seed_frames(sharp_split):
48
  @st.cache_data(ttl = 60)
49
  def init_DK_secondary_seed_frames(sharp_split):
50
 
51
- collection = db['DK_MLB_secondary_name_map']
52
  cursor = collection.find()
53
  raw_data = pd.DataFrame(list(cursor))
54
  names_dict = dict(zip(raw_data['key'], raw_data['value']))
@@ -58,7 +58,7 @@ def init_DK_secondary_seed_frames(sharp_split):
58
  cursor = collection.find({"Site": "Draftkings", "Slate": "secondary_slate"})
59
  valid_players = set(pd.DataFrame(list(cursor))['Player'].unique())
60
 
61
- collection = db["DK_MLB_secondary_seed_frame"]
62
  cursor = collection.find().limit(sharp_split)
63
 
64
  raw_display = pd.DataFrame(list(cursor))
@@ -73,7 +73,7 @@ def init_DK_secondary_seed_frames(sharp_split):
73
  @st.cache_data(ttl = 60)
74
  def init_DK_auxiliary_seed_frames(sharp_split):
75
 
76
- collection = db['DK_MLB_turbo_name_map']
77
  cursor = collection.find()
78
  raw_data = pd.DataFrame(list(cursor))
79
  names_dict = dict(zip(raw_data['key'], raw_data['value']))
@@ -83,7 +83,7 @@ def init_DK_auxiliary_seed_frames(sharp_split):
83
  cursor = collection.find({"Site": "Draftkings", "Slate": "turbo_slate"})
84
  valid_players = set(pd.DataFrame(list(cursor))['Player'].unique())
85
 
86
- collection = db["DK_MLB_turbo_seed_frame"]
87
  cursor = collection.find().limit(sharp_split)
88
 
89
  raw_display = pd.DataFrame(list(cursor))
@@ -123,7 +123,7 @@ def init_FD_seed_frames(sharp_split):
123
  @st.cache_data(ttl = 60)
124
  def init_FD_secondary_seed_frames(sharp_split):
125
 
126
- collection = db['FD_MLB_secondary_name_map']
127
  cursor = collection.find()
128
  raw_data = pd.DataFrame(list(cursor))
129
  names_dict = dict(zip(raw_data['key'], raw_data['value']))
@@ -133,7 +133,7 @@ def init_FD_secondary_seed_frames(sharp_split):
133
  cursor = collection.find({"Site": "Fanduel", "Slate": "secondary_slate"})
134
  valid_players = set(pd.DataFrame(list(cursor))['Player'].unique())
135
 
136
- collection = db["FD_MLB_secondary_seed_frame"]
137
  cursor = collection.find().limit(sharp_split)
138
 
139
  raw_display = pd.DataFrame(list(cursor))
@@ -148,7 +148,7 @@ def init_FD_secondary_seed_frames(sharp_split):
148
  @st.cache_data(ttl = 60)
149
  def init_FD_auxiliary_seed_frames(sharp_split):
150
 
151
- collection = db['FD_MLB_turbo_name_map']
152
  cursor = collection.find()
153
  raw_data = pd.DataFrame(list(cursor))
154
  names_dict = dict(zip(raw_data['key'], raw_data['value']))
@@ -158,7 +158,7 @@ def init_FD_auxiliary_seed_frames(sharp_split):
158
  cursor = collection.find({"Site": "Fanduel", "Slate": "turbo_slate"})
159
  valid_players = set(pd.DataFrame(list(cursor))['Player'].unique())
160
 
161
- collection = db["FD_MLB_turbo_seed_frame"]
162
  cursor = collection.find().limit(sharp_split)
163
 
164
  raw_display = pd.DataFrame(list(cursor))
 
48
  @st.cache_data(ttl = 60)
49
  def init_DK_secondary_seed_frames(sharp_split):
50
 
51
+ collection = db['DK_MLB_Secondary_name_map']
52
  cursor = collection.find()
53
  raw_data = pd.DataFrame(list(cursor))
54
  names_dict = dict(zip(raw_data['key'], raw_data['value']))
 
58
  cursor = collection.find({"Site": "Draftkings", "Slate": "secondary_slate"})
59
  valid_players = set(pd.DataFrame(list(cursor))['Player'].unique())
60
 
61
+ collection = db["DK_MLB_Secondary_seed_frame"]
62
  cursor = collection.find().limit(sharp_split)
63
 
64
  raw_display = pd.DataFrame(list(cursor))
 
73
  @st.cache_data(ttl = 60)
74
  def init_DK_auxiliary_seed_frames(sharp_split):
75
 
76
+ collection = db['DK_MLB_Turbo_name_map']
77
  cursor = collection.find()
78
  raw_data = pd.DataFrame(list(cursor))
79
  names_dict = dict(zip(raw_data['key'], raw_data['value']))
 
83
  cursor = collection.find({"Site": "Draftkings", "Slate": "turbo_slate"})
84
  valid_players = set(pd.DataFrame(list(cursor))['Player'].unique())
85
 
86
+ collection = db["DK_MLB_Turbo_seed_frame"]
87
  cursor = collection.find().limit(sharp_split)
88
 
89
  raw_display = pd.DataFrame(list(cursor))
 
123
  @st.cache_data(ttl = 60)
124
  def init_FD_secondary_seed_frames(sharp_split):
125
 
126
+ collection = db['FD_MLB_Secondary_name_map']
127
  cursor = collection.find()
128
  raw_data = pd.DataFrame(list(cursor))
129
  names_dict = dict(zip(raw_data['key'], raw_data['value']))
 
133
  cursor = collection.find({"Site": "Fanduel", "Slate": "secondary_slate"})
134
  valid_players = set(pd.DataFrame(list(cursor))['Player'].unique())
135
 
136
+ collection = db["FD_MLB_Secondary_seed_frame"]
137
  cursor = collection.find().limit(sharp_split)
138
 
139
  raw_display = pd.DataFrame(list(cursor))
 
148
  @st.cache_data(ttl = 60)
149
  def init_FD_auxiliary_seed_frames(sharp_split):
150
 
151
+ collection = db['FD_MLB_Turbo_name_map']
152
  cursor = collection.find()
153
  raw_data = pd.DataFrame(list(cursor))
154
  names_dict = dict(zip(raw_data['key'], raw_data['value']))
 
158
  cursor = collection.find({"Site": "Fanduel", "Slate": "turbo_slate"})
159
  valid_players = set(pd.DataFrame(list(cursor))['Player'].unique())
160
 
161
+ collection = db["FD_MLB_Turbo_seed_frame"]
162
  cursor = collection.find().limit(sharp_split)
163
 
164
  raw_display = pd.DataFrame(list(cursor))