correction de l'exercice

parent 1fa062c8
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 24, "execution_count": 39,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -34,7 +34,21 @@ ...@@ -34,7 +34,21 @@
"source": [ "source": [
"#modification de l'url vers le CSV upload sur gitlab\n", "#modification de l'url vers le CSV upload sur gitlab\n",
"# data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\"\n", "# data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\"\n",
"data_url = \"https://app-learninglab.inria.fr/moocrr/gitlab/e6a2acf6b1e71323e580d5754b297b60/mooc-rr/raw/9ad005b7c8da7edc39539f48ba27044d97b611c4/module3/exo1/incidence-PAY-3_1_.csv\"" "# data_url = \"https://app-learninglab.inria.fr/moocrr/gitlab/e6a2acf6b1e71323e580d5754b297b60/mooc-rr/raw/9ad005b7c8da7edc39539f48ba27044d97b611c4/module3/exo1/incidence-PAY-3_1_.csv\""
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [],
"source": [
"data_file = \"syndrome-grippal.csv\"\n",
"\n",
"import os\n",
"import urllib.request\n",
"if not os.path.exists(data_file):\n",
" urllib.request.urlretrieve(data_url, data_file)"
] ]
}, },
{ {
...@@ -61,7 +75,7 @@ ...@@ -61,7 +75,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 26, "execution_count": 41,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1026,13 +1040,14 @@ ...@@ -1026,13 +1040,14 @@
"[1846 rows x 10 columns]" "[1846 rows x 10 columns]"
] ]
}, },
"execution_count": 26, "execution_count": 41,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
], ],
"source": [ "source": [
"raw_data = pd.read_csv(data_url, skiprows=1)\n", "# raw_data = pd.read_csv(data_url, skiprows=1)\n",
"raw_data = pd.read_csv(data_file, skiprows=1)\n",
"raw_data" "raw_data"
] ]
}, },
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment