<jupyter_start><jupyter_text><jupyter_code># Imports
import pandas as pd
# Combine the defense, offense and rookies into one weekly prediction
for i in range(1, 18):
    defense_filename = 'https://raw.githubusercontent.com/Lambda-School-Labs/nfl-fantasy-ds/master/data/neural-network/df/week' + str(i) + '-pred-defense.csv'
    ki_filename = 'https://raw.githubusercontent.com/Lambda-School-Labs/nfl-fantasy-ds/master/data/neural-network/ki/week' + str(i) + '-pred-offense-norookies-k.csv'
    qb_filename = 'https://raw.githubusercontent.com/Lambda-School-Labs/nfl-fantasy-ds/master/data/neural-network/qb/week' + str(i) + '-pred-offense-norookies-qb.csv'
    rb_filename = 'https://raw.githubusercontent.com/Lambda-School-Labs/nfl-fantasy-ds/master/data/neural-network/rb/week' + str(i) + '-pred-offense-norookies-rb.csv'
    te_filename = 'https://raw.githubusercontent.com/Lambda-School-Labs/nfl-fantasy-ds/master/data/neural-network/te/week' + str(i) + '-pred-offense-norookies-te.csv'
    wr_filename = 'https://raw.githubusercontent.com/Lambda-School-Labs/nfl-fantasy-ds/master/data/neural-network/wr/week' + str(i) + '-pred-offense-norookies-wr.csv'
    rookie_filename = 'https://raw.githubusercontent.com/Lambda-School-Labs/nfl-fantasy-ds/master/data/group-predictions/week' + str(i) + '-pred-offense-rookies.csv'

    defense_df = pd.read_csv(defense_filename)
    ki_df = pd.read_csv(ki_filename)
    qb_df = pd.read_csv(qb_filename)
    rb_df = pd.read_csv(rb_filename)
    te_df = pd.read_csv(te_filename)
    wr_df = pd.read_csv(wr_filename)
    rookies_df = pd.read_csv(rookie_filename)

    predictions_df = pd.concat([defense_df, ki_df, qb_df, rb_df, te_df, wr_df, rookies_df], ignore_index=True)

    week_cur = 'week' + str(i) + '-cur'
    week_pred = 'week' + str(i) + '-pred'
    week_act = 'week' + str(i) + '-act'

    predictions_df['rank-cur'] = predictions_df[week_cur].rank(method='min', ascending=False)
    predictions_df['rank-pred'] = predictions_df[week_pred].rank(method='min', ascending=False)
    predictions_df['rank-act'] = predictions_df[week_act].rank(method='min', ascending=False)

    predictions_df = predictions_df.sort_values(by=['rank-pred'])

    pred_filename = '/content/predictions-week' + str(i) + '.csv'

    predictions_df.to_csv(pred_filename, index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.161400512382579, 'fraction_numerical': 0.0012809564474807857, 'mean_word_length': 4.618705035971223, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '68826', 'license': 'MIT', 'n_tokens_mistral': 916, 'n_tokens_neox': 887, 'n_words': 101, 'path': 'neural-network/Predictions_Combined.ipynb', 'repo_name': 'JimKing100/nfl-test', 'size': '2342'}