Skip to content

Commit

Permalink
Merge pull request #56 from neurorepro/iquant
Browse files Browse the repository at this point in the history
Iquant
  • Loading branch information
neurorepro authored Jun 4, 2021
2 parents 636b761 + 041ce7e commit 9dd93d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion code/6_sMRI_quantification_stats.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 9dd93d9

Please sign in to comment.