diff --git a/module3/exo1/analyse-syndrome-grippal.ipynb b/module3/exo1/analyse-syndrome-grippal.ipynb index 2eeedcb8a614926a4e6ccc763613605655b7aa1a..eaffc4f103289de12ec906e4cf673808d8726917 100644 --- a/module3/exo1/analyse-syndrome-grippal.ipynb +++ b/module3/exo1/analyse-syndrome-grippal.ipynb @@ -32,8 +32,7 @@ "metadata": {}, "outputs": [], "source": [ - "filename = 'incidence-PAY-3.csv'\n", - "data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\"" + "filename = 'incidence-PAY-3.csv'" ] }, { @@ -60,8 +59,10 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": {}, + "execution_count": 16, + "metadata": { + "scrolled": false + }, "outputs": [ { "data": { @@ -1025,13 +1026,18 @@ "[1897 rows x 10 columns]" ] }, - "execution_count": 3, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "raw_data = pd.read_csv(filename, skiprows=1)\n", + "# Si le fichier de données n'est pas présent, il sera téléchargé depuis le serveur.\n", + "try:\n", + " raw_data = pd.read_csv(filename, skiprows=1)\n", + "except FileNotFoundError:\n", + " !wget \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\"\n", + " raw_data = pd.read_csv(filename, skiprows=1)\n", "raw_data" ] }, @@ -2208,7 +2214,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 9, @@ -2247,7 +2253,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 10, @@ -2351,7 +2357,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 13, @@ -2453,7 +2459,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 15,