From 8fdaf64f633c69f96a34b322daa3a28b12929c75 Mon Sep 17 00:00:00 2001 From: d24bcd136c9baa600f332b2f8b973d62 Date: Tue, 13 Dec 2022 15:29:39 +0000 Subject: [PATCH] mooc --- module3/exo3/exercice.mooc.ipynb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/module3/exo3/exercice.mooc.ipynb b/module3/exo3/exercice.mooc.ipynb index 8a44ca3..eeb7c0f 100644 --- a/module3/exo3/exercice.mooc.ipynb +++ b/module3/exo3/exercice.mooc.ipynb @@ -198,8 +198,6 @@ } ], "source": [ - "# how much percentage Gender in the dataset\n", - "\n", "df['Smoker'].value_counts().plot.pie(explode=[0,0.1],autopct='%1.1f%%',shadow=True)" ] }, @@ -230,7 +228,7 @@ } ], "source": [ - "# how much percentage Gender in the dataset\n", + "# Taux de mortalité (le rapport entre le nombre de femmes décédées dans un groupe et le nombre total de femmes dans ce groupe)\n", "\n", "df['Status'].value_counts().plot.pie(explode=[0,0.1],autopct='%1.1f%%',shadow=True)" ] @@ -888,11 +886,21 @@ } ], "source": [ + "#Taux de mortalité\n", "df=df.groupby(['age_group','status']).size()\n", "df=df.unstack()\n", "df.plot(kind='bar')" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "#le taus de mort est plus eleve a partir a partir de 34 ans " + ] + }, { "cell_type": "code", "execution_count": 44, -- 2.18.1