Update 2-Working-With-Data/08-data-preparation/notebook.ipynb

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pull/684/head
Lee Stott 12 months ago committed by GitHub
parent c7982edc02
commit 95ded644fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -3909,8 +3909,11 @@
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" from scipy import stats\n",
"\n",
"except ImportError:\n",
" print(\"scipy is required for Z-score calculation. Please install it with 'pip install scipy' and rerun this cell.\")\n",
"else:\n",
" # Calculate Z-scores for age\n",
" dirty_data['age_zscore'] = np.abs(stats.zscore(dirty_data['age']))\n",
"\n",

Loading…
Cancel
Save