def players_comparison(player_1, player_2):
    df = pd.read_csv('data/players_18.csv')
    player_1_df = df.query('sofifa_id == {}'.format(player_1))
    player_2_df = df.query('sofifa_id == {}'.format(player_2))
    player_1_df = need_columns(player_1_df)
    player_2_df = need_columns(player_2_df)
    (player_1_df, player_2_df) = convert_num_values(player_1_df, player_2_df)
    (player_1_df, player_2_df) = convert_traits(player_1_df, player_2_df)
    player_1_df = player_1_df.drop(columns='player_tags')
    player_2_df = player_2_df.drop(columns='player_tags')
    player_1_df = convert_preferred_foot(player_1_df)
    player_2_df = convert_preferred_foot(player_2_df)
    player_1_df = convert_work_rate(player_1_df)
    player_2_df = convert_work_rate(player_2_df)
    cos = similarity(player_1_df, player_2_df)
    print('cos', cos)
def players_comparison(player_1, player_2):
    df = pd.read_csv('data/players_18.csv')
    player_1_df = df.query('sofifa_id == {}'.format(player_1))
    player_2_df = df.query('sofifa_id == {}'.format(player_2))
    player_1_df = need_columns(player_1_df)
    player_2_df = need_columns(player_2_df)
    (player_1_df, player_2_df) = convert_num_values(player_1_df, player_2_df)
    (player_1_df, player_2_df) = convert_traits(player_1_df, player_2_df)
    player_1_df = player_1_df.drop(columns='player_tags')
    player_2_df = player_2_df.drop(columns='player_tags')
    player_1_df = convert_preferred_foot(player_1_df)
    player_2_df = convert_preferred_foot(player_2_df)
    player_1_df = convert_work_rate(player_1_df)
    player_2_df = convert_work_rate(player_2_df)
    cos = similarity(player_1_df, player_2_df)
    print('cos', cos)