Spaces:
Running
Running
James McCool
commited on
Commit
·
66deb94
1
Parent(s):
896d108
Update player data query in app.py to support multiple player names. Changed the query to use the "$in" operator for playername, allowing for more flexible data retrieval across multiple players. This enhancement improves the accuracy of game log data retrieval for player statistics.
Browse files
app.py
CHANGED
@@ -374,7 +374,7 @@ def init_player_data(players, opponent, win_loss_settings, kill_predictions, dea
|
|
374 |
end_datetime = datetime.combine(end_date, datetime.max.time()).strftime("%Y-%m-%d %H:%M:%S")
|
375 |
|
376 |
collection = db["gamelogs"]
|
377 |
-
cursor = collection.find({"playername": players, "date": {"$gte": start_datetime, "$lte": end_datetime}})
|
378 |
raw_display = pd.DataFrame(list(cursor))
|
379 |
|
380 |
cursor = collection.find({"date": {"$gte": start_datetime, "$lte": end_datetime}})
|
|
|
374 |
end_datetime = datetime.combine(end_date, datetime.max.time()).strftime("%Y-%m-%d %H:%M:%S")
|
375 |
|
376 |
collection = db["gamelogs"]
|
377 |
+
cursor = collection.find({"playername": {"$in": players}, "date": {"$gte": start_datetime, "$lte": end_datetime}})
|
378 |
raw_display = pd.DataFrame(list(cursor))
|
379 |
|
380 |
cursor = collection.find({"date": {"$gte": start_datetime, "$lte": end_datetime}})
|