<jupyter_start><jupyter_text>**Deel 1**<jupyter_code>df = pd.read_csv("input.txt", names =['tekst'])
def bereken_nummer(reeks, lengte, letter_voor, letter_achter):
    sel = lengte
    for letter in reeks:
        half = len(sel)//2
        if letter == letter_voor:
            sel = sel[:half]
        elif letter == letter_achter:
            sel = sel[half:]
        else:
            print(f"{letter} Onverwachte letter")
            break
    return (sel[0])
df['rij'] = df['tekst'].str.slice(stop=7).apply(bereken_nummer, args=(list(range(0,128)), 'F', 'B'))
df['kolom'] = df['tekst'].str.slice(start=7).apply(bereken_nummer, args=(list(range(0,8)), 'L', 'R'))
df['ID'] = (df['rij'] * 8) + df['kolom']
print(f'Hoogste ID: {df["ID"].max()}')<jupyter_output>Hoogste ID: 976<jupyter_text>**Deel 2**<jupyter_code>mogelijkerij = df.loc[(df['rij'] != df['rij'].min()) & (df['rij'] != df['rij'].max()),:]
mogelijkeID =set(range(mogelijkerij["ID"].min(), mogelijkerij["ID"].max()+1))
ID = mogelijkeID.difference(mogelijkerij["ID"])
print(f'Je stoelID is: {ID}')<jupyter_output>Je stoelID is: {685}
{'fraction_non_alphanumeric': 0.22354014598540145, 'fraction_numerical': 0.01824817518248175, 'mean_word_length': 4.568527918781726, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '442790', 'license': 'Apache-2.0', 'n_tokens_mistral': 454, 'n_tokens_neox': 441, 'n_words': 71, 'path': 'Dag5.ipynb', 'repo_name': 'isepri/Adventofcode2020', 'size': '1096'}