From 1a2b65f45810cdab6a6290b36b2b5a2f2c29327a Mon Sep 17 00:00:00 2001 From: Michelle Wang Date: Fri, 30 Aug 2024 11:08:36 -0400 Subject: [PATCH] fill NA with False for neuromelanin column --- nipoppy/workflow/tabular/generate_manifest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nipoppy/workflow/tabular/generate_manifest.py b/nipoppy/workflow/tabular/generate_manifest.py index 19c4e0c5..5cb4dbe6 100755 --- a/nipoppy/workflow/tabular/generate_manifest.py +++ b/nipoppy/workflow/tabular/generate_manifest.py @@ -272,6 +272,9 @@ def run(global_config_file: str, regenerate: bool, make_release: bool): lambda datatype: datatype if isinstance(datatype, list) else [] ) + # replace NA neuromelanin by False + df_manifest[COL_NEUROMELANIN_MANIFEST] = df_manifest[COL_NEUROMELANIN_MANIFEST].fillna(False) + # convert session to BIDS format with_imaging = ~df_manifest[COL_SESSION_MANIFEST].isna() df_manifest.loc[with_imaging, COL_SESSION_MANIFEST] = df_manifest.loc[with_imaging, COL_SESSION_MANIFEST].apply(