22 lines
567 B
Python
22 lines
567 B
Python
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
|