Created
February 5, 2026 22:03
-
-
Save tashrifbillah/e030aa684a4a156648e42dc7510c46c6 to your computer and use it in GitHub Desktop.
Parse figs_m01 values /data/predict1/data_from_nda/Prescient/PHOENIX/PROTECTED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Execute it within | |
| import pandas as pd | |
| from glob import glob | |
| files=glob('Prescient??/raw/*/surveys/???????_family_interview_for_genetic_studies_figs.csv') | |
| v='chrfigs_mother_m01' | |
| values=[] | |
| for file in files: | |
| df=pd.read_csv(file, dtype=str, keep_default_na=False) | |
| if df.shape[0]>1: | |
| print(file) | |
| else: | |
| values.append(df.loc[0,v]) | |
| print(set(values)) | |
| v='chrfigs_father_m01' | |
| values=[] | |
| for file in files: | |
| df=pd.read_csv(file, dtype=str, keep_default_na=False) | |
| if df.shape[0]>1: | |
| print(file) | |
| else: | |
| values.append(df.loc[0,v]) | |
| print(set(values)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment