Add .ffill() and .fillna() because there are some missing values in the height column

pull/723/head
Amber Wang 8 months ago
parent cf1edde68c
commit e7edf32e33

@ -384,7 +384,7 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"heights = df['Height']\n", "heights = df['Height'].fillna(method='pad')\n",
"salaries = 1000+(heights-heights.min())/(heights.max()-heights.mean())*100\n", "salaries = 1000+(heights-heights.min())/(heights.max()-heights.mean())*100\n",
"print(list(zip(heights, salaries))[:10])" "print(list(zip(heights, salaries))[:10])"
] ]

Loading…
Cancel
Save