Spaces:
Running
Running
James McCool
commited on
Commit
·
5dc664e
1
Parent(s):
64f87a1
Refactor FD seed frame initialization in app.py to retrieve all data from the database and construct a names dictionary using key-value pairs. This change enhances data handling and improves the display of player names in the output, ensuring better visibility during contest simulations.
Browse files
app.py
CHANGED
@@ -49,8 +49,9 @@ def init_DK_Secondary_seed_frames(sharp_split):
|
|
49 |
def init_FD_seed_frames(sharp_split):
|
50 |
|
51 |
collection = db['FD_NFL_name_map']
|
52 |
-
cursor = collection.find(
|
53 |
-
|
|
|
54 |
|
55 |
st.table(names_dict)
|
56 |
|
|
|
49 |
def init_FD_seed_frames(sharp_split):
|
50 |
|
51 |
collection = db['FD_NFL_name_map']
|
52 |
+
cursor = collection.find()
|
53 |
+
raw_data = pd.DataFrame(list(cursor))
|
54 |
+
names_dict = dict(zip(raw_data['key'], raw_data['value']))
|
55 |
|
56 |
st.table(names_dict)
|
57 |
|