示例#1
0
def similar_players(player: str):
    similar = Model(player)
    top_three, longevity = similar.build_similars()
    data = {}
    data['longevity'] = longevity[0]
    top_three = top_three.to_json(orient='index')
    data['similars'] = top_three

    return data
示例#2
0
def similar_players(player: str):
    similar = Model(player)
    top_three = similar.build_similars()

    return top_three.to_json(orient='index')