Initial commit
This commit is contained in:
21
website/spreadsheet.py
Normal file
21
website/spreadsheet.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import pandas as pd
|
||||
|
||||
from website.download import get_games_from_steam, get_max_players_data
|
||||
|
||||
|
||||
|
||||
def get_games_for_people(people: list) -> (list, list):
|
||||
|
||||
dfg = get_games_from_steam(people)
|
||||
dfp = get_max_players_data()
|
||||
|
||||
all_have = dfg.index[(dfg[people] > 0).all(axis=1)]
|
||||
enough_slots = dfp.index[dfp['Players'] >= len(people)]
|
||||
|
||||
candidates = all_have[all_have.isin(enough_slots)]
|
||||
candidates = sorted(candidates.to_list())
|
||||
|
||||
unknown = all_have[~all_have.isin(dfp.index)]
|
||||
unknown = sorted(unknown.to_list())
|
||||
|
||||
return candidates, unknown
|
||||
Reference in New Issue
Block a user