Spaces:
Sleeping
Sleeping
James McCool
commited on
Commit
·
1086fd6
1
Parent(s):
29e7d2d
Refine lineup data retrieval in app.py: update database queries to filter teams with less than 6 players for both Draftkings and Fanduel, enhancing data accuracy and lineup generation.
Browse files
app.py
CHANGED
|
@@ -177,7 +177,7 @@ def init_DK_SD_lineups(slate_desig: str):
|
|
| 177 |
elif slate_desig == 'Auxiliary':
|
| 178 |
collection = db["DK_NBA_Auxiliary_SD_seed_frame"]
|
| 179 |
|
| 180 |
-
cursor = collection.find().limit(10000)
|
| 181 |
|
| 182 |
raw_display = pd.DataFrame(list(cursor))
|
| 183 |
raw_display = raw_display[['CPT', 'FLEX1', 'FLEX2', 'FLEX3', 'FLEX4', 'FLEX5', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
|
|
@@ -232,7 +232,7 @@ def init_FD_SD_lineups(slate_desig: str):
|
|
| 232 |
elif slate_desig == 'Auxiliary':
|
| 233 |
collection = db["FD_NBA_Auxiliary_SD_seed_frame"]
|
| 234 |
|
| 235 |
-
cursor = collection.find().limit(10000)
|
| 236 |
|
| 237 |
raw_display = pd.DataFrame(list(cursor))
|
| 238 |
raw_display = raw_display[['CPT', 'FLEX1', 'FLEX2', 'FLEX3', 'FLEX4', 'FLEX5', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
|
|
|
|
| 177 |
elif slate_desig == 'Auxiliary':
|
| 178 |
collection = db["DK_NBA_Auxiliary_SD_seed_frame"]
|
| 179 |
|
| 180 |
+
cursor = collection.find({"Team_count": {"$lt": 6}}).limit(10000)
|
| 181 |
|
| 182 |
raw_display = pd.DataFrame(list(cursor))
|
| 183 |
raw_display = raw_display[['CPT', 'FLEX1', 'FLEX2', 'FLEX3', 'FLEX4', 'FLEX5', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
|
|
|
|
| 232 |
elif slate_desig == 'Auxiliary':
|
| 233 |
collection = db["FD_NBA_Auxiliary_SD_seed_frame"]
|
| 234 |
|
| 235 |
+
cursor = collection.find({"Team_count": {"$lt": 6}}).limit(10000)
|
| 236 |
|
| 237 |
raw_display = pd.DataFrame(list(cursor))
|
| 238 |
raw_display = raw_display[['CPT', 'FLEX1', 'FLEX2', 'FLEX3', 'FLEX4', 'FLEX5', 'salary', 'proj', 'Team', 'Team_count', 'Secondary', 'Secondary_count', 'Own']]
|