Spaces:
Running
Running
James McCool
commited on
Commit
·
0a89db4
1
Parent(s):
302e164
fixed FD database query
Browse files
src/sim_func_hold/regular_functions.py
CHANGED
|
@@ -42,25 +42,25 @@ def init_DK_seed_frames(slate_var, sharp_split):
|
|
| 42 |
def init_FD_seed_frames(slate_var, sharp_split):
|
| 43 |
|
| 44 |
if slate_var == 'Main Slate':
|
| 45 |
-
collection = db['
|
| 46 |
cursor = collection.find()
|
| 47 |
raw_data = pd.DataFrame(list(cursor))
|
| 48 |
names_dict = dict(zip(raw_data['key'], raw_data['value']))
|
| 49 |
-
collection = db[f"
|
| 50 |
cursor = collection.find().limit(sharp_split)
|
| 51 |
elif slate_var == 'Secondary Slate':
|
| 52 |
-
collection = db['
|
| 53 |
cursor = collection.find()
|
| 54 |
raw_data = pd.DataFrame(list(cursor))
|
| 55 |
names_dict = dict(zip(raw_data['key'], raw_data['value']))
|
| 56 |
-
collection = db[f"
|
| 57 |
cursor = collection.find().limit(sharp_split)
|
| 58 |
elif slate_var == 'Late Slate':
|
| 59 |
-
collection = db['
|
| 60 |
cursor = collection.find()
|
| 61 |
raw_data = pd.DataFrame(list(cursor))
|
| 62 |
names_dict = dict(zip(raw_data['key'], raw_data['value']))
|
| 63 |
-
collection = db[f"
|
| 64 |
cursor = collection.find().limit(sharp_split)
|
| 65 |
|
| 66 |
raw_display = pd.DataFrame(list(cursor))
|
|
|
|
| 42 |
def init_FD_seed_frames(slate_var, sharp_split):
|
| 43 |
|
| 44 |
if slate_var == 'Main Slate':
|
| 45 |
+
collection = db['FD_NBA_name_map']
|
| 46 |
cursor = collection.find()
|
| 47 |
raw_data = pd.DataFrame(list(cursor))
|
| 48 |
names_dict = dict(zip(raw_data['key'], raw_data['value']))
|
| 49 |
+
collection = db[f"FD_NBA_seed_frame_Main Slate"]
|
| 50 |
cursor = collection.find().limit(sharp_split)
|
| 51 |
elif slate_var == 'Secondary Slate':
|
| 52 |
+
collection = db['FD_NBA_Secondary_name_map']
|
| 53 |
cursor = collection.find()
|
| 54 |
raw_data = pd.DataFrame(list(cursor))
|
| 55 |
names_dict = dict(zip(raw_data['key'], raw_data['value']))
|
| 56 |
+
collection = db[f"FD_NBA_seed_frame_Secondary Slate"]
|
| 57 |
cursor = collection.find().limit(sharp_split)
|
| 58 |
elif slate_var == 'Late Slate':
|
| 59 |
+
collection = db['FD_NBA_Late_name_map']
|
| 60 |
cursor = collection.find()
|
| 61 |
raw_data = pd.DataFrame(list(cursor))
|
| 62 |
names_dict = dict(zip(raw_data['key'], raw_data['value']))
|
| 63 |
+
collection = db[f"FD_NBA_seed_frame_Late Slate"]
|
| 64 |
cursor = collection.find().limit(sharp_split)
|
| 65 |
|
| 66 |
raw_display = pd.DataFrame(list(cursor))
|