diff --git a/code/6_sMRI_quantification_stats.ipynb b/code/6_sMRI_quantification_stats.ipynb index 06a746c9..04215d85 100644 --- a/code/6_sMRI_quantification_stats.ipynb +++ b/code/6_sMRI_quantification_stats.ipynb @@ -3193,7 +3193,13 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "subjects_info_withna = bids_layout.get(suffix=\"participants\", extension=\".tsv\")[0].get_df()\n", + "subjects_info = subjects_info_withna.copy()\n", + "subjects_info[\"age\"] = subjects_info_withna[\"age\"].fillna(subjects_info_withna[\"age\"].mean())\n", + "subjects_info[\"sex\"] = subjects_info_withna[\"sex\"].fillna(subjects_info_withna[\"sex\"].mode()[0])\n", + "subjects_info.loc[subjects_info.isnull().any(axis=1), :]" + ] }, { "cell_type": "markdown",