<jupyter_start><jupyter_text>Comprehension  Import Comprehension data<jupyter_code>frame = pd.DataFrame()
for file in source_dir.glob('Comprehension-*'):
    df = pd.read_csv(source_dir / file)
    df['time'] = file.name[14]
    frame = frame.append(df)<jupyter_output><empty_output><jupyter_text>Filter & Sort<jupyter_code>frame=frame.sort_values(['SSID','time']).set_index(['SSID','time'])
frame.head()<jupyter_output><empty_output><jupyter_text>Output<jupyter_code>frame.to_csv(derivs_dir / 'comp_subject_level.csv')<jupyter_output><empty_output><jupyter_text>Survey Blocks  Import & combine Survey data<jupyter_code>frames=[]
for file in source_dir.glob('Survey-*'):
    df = pd.read_csv(source_dir / file)
    frames.append(df)
frame = frames[1].merge(frames[0],'outer',on='SSID')
frame.head()<jupyter_output><empty_output><jupyter_text>Output<jupyter_code>frame.to_csv( derivs_dir / 'survey_subject_level.csv', index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15641293013555788, 'fraction_numerical': 0.004171011470281543, 'mean_word_length': 9.105263157894736, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '205138', 'license': 'MIT', 'n_tokens_mistral': 376, 'n_tokens_neox': 366, 'n_words': 38, 'path': 'notebooks/0.2.clean_qualtrics.ipynb', 'repo_name': 'lighthall-lab/scilearn', 'size': '959'}