diff --git a/module3/exo2/exercice.ipynb b/module3/exo2/exercice.ipynb index 5bc13614ef467b5bbc911f02563111b5f40168a6..7c26e958a1626d391f003a0efffd7573ea9ffedb 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))" ] }, {