Open tashrifbillah opened 1 year ago
Pandas does a default NaN interpretation for strings like NA: RPMS:
NA
In [20]: df1.loc['ME04106']['visit chrfigs_mother_d04'.split()] Out[20]: visit 1 chrfigs_mother_d04 NaN Name: ME04106, dtype: object
So the files should be read as:
df1=pd.read_csv('PrescientStudy_Prescient_family_interview_for_genetic_studies_figs_01.06.2023.csv',dtype ...: =str, keep_default_na=False)
Those two arguments can retain the NA. We should modify rpms_to_redcap.py accordingly.
rpms_to_redcap.py
Credited to @owenborders @nickckim
https://pandas.pydata.org/docs/reference/api/pandas.read_csv.html
Pandas does a default NaN interpretation for strings like
NA
: RPMS:So the files should be read as:
Those two arguments can retain the
NA
. We should modifyrpms_to_redcap.py
accordingly.Credited to @owenborders @nickckim