From 30fae98a65328fc49b30e832c991af645a0f66be Mon Sep 17 00:00:00 2001 From: 0e57e1b8e1a23d7aaeee34c5821213f6 <0e57e1b8e1a23d7aaeee34c5821213f6@app-learninglab.inria.fr> Date: Sun, 23 May 2021 15:12:16 +0000 Subject: [PATCH] updatevf --- module3/exo2/exercice.ipynb | 48 ++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/module3/exo2/exercice.ipynb b/module3/exo2/exercice.ipynb index 5bc1361..7c26e95 100644 --- a/module3/exo2/exercice.ipynb +++ b/module3/exo2/exercice.ipynb @@ -9,14 +9,15 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 102, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", - "import isoweek" + "import isoweek\n", + "import numpy as np" ] }, { @@ -3546,44 +3547,47 @@ "yearly_incidence.hist(xrot=20)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Reponse aux questions : années du maximum d'incience et années du minimum d'incidence." + ] + }, { "cell_type": "code", - "execution_count": 95, + "execution_count": 108, "metadata": {}, "outputs": [ { - "data": { - "text/plain": [ - "842373" - ] - }, - "execution_count": 95, - "metadata": {}, - "output_type": "execute_result" + "name": "stdout", + "output_type": "stream", + "text": [ + "2009 842373\n" + ] } ], "source": [ - "max(yearly_incidence)" + "maxindex = np.argmax(yearly_incidence)\n", + "print(maxindex,max(yearly_incidence))" ] }, { "cell_type": "code", - "execution_count": 93, + "execution_count": 113, "metadata": {}, "outputs": [ { - "data": { - "text/plain": [ - "516689" - ] - }, - "execution_count": 93, - "metadata": {}, - "output_type": "execute_result" + "name": "stdout", + "output_type": "stream", + "text": [ + "2002 516689\n" + ] } ], "source": [ - "min(yearly_incidence)" + "minindex = np.argmin(yearly_incidence)\n", + "print(minindex,min(yearly_incidence))" ] }, { -- 2.18.1