comment modifs

parent 049e522a
...@@ -59,18 +59,21 @@ ...@@ -59,18 +59,21 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": 11,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"raw_data = pd.read_csv(data_url, skiprows=1)\n", "raw_data = pd.read_csv(data_url, skiprows=1)\n",
"raw_data\n", "raw_data\n",
"file = '/home/jovyan/work/module3/exo1/incidence-PAY-3.csv'\n", "file = '/home/jovyan/work/module3/exo1/incidence-PAY-3.csv'\n",
"# check existing local copy\n",
"try:\n", "try:\n",
" local_data = pd.read_csv(file)\n", " local_data = pd.read_csv(file)\n",
"# if no local copy, create it\n",
"except FileNotFoundError:\n", "except FileNotFoundError:\n",
" raw_data.to_csv('incidence-PAY-3.csv')\n", " raw_data.to_csv('incidence-PAY-3.csv')\n",
"rax_data = pd.read_csv('incidence-PAY-3.csv')" "# read local copy\n",
"raw_data = pd.read_csv('incidence-PAY-3.csv')"
] ]
}, },
{ {
...@@ -82,7 +85,7 @@ ...@@ -82,7 +85,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": 12,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -106,6 +109,7 @@ ...@@ -106,6 +109,7 @@
" <thead>\n", " <thead>\n",
" <tr style=\"text-align: right;\">\n", " <tr style=\"text-align: right;\">\n",
" <th></th>\n", " <th></th>\n",
" <th>Unnamed: 0</th>\n",
" <th>week</th>\n", " <th>week</th>\n",
" <th>indicator</th>\n", " <th>indicator</th>\n",
" <th>inc</th>\n", " <th>inc</th>\n",
...@@ -121,6 +125,7 @@ ...@@ -121,6 +125,7 @@
" <tbody>\n", " <tbody>\n",
" <tr>\n", " <tr>\n",
" <th>1656</th>\n", " <th>1656</th>\n",
" <td>1656</td>\n",
" <td>198919</td>\n", " <td>198919</td>\n",
" <td>3</td>\n", " <td>3</td>\n",
" <td>0</td>\n", " <td>0</td>\n",
...@@ -137,14 +142,14 @@ ...@@ -137,14 +142,14 @@
"</div>" "</div>"
], ],
"text/plain": [ "text/plain": [
" week indicator inc inc_low inc_up inc100 inc100_low inc100_up \\\n", " Unnamed: 0 week indicator inc inc_low inc_up inc100 inc100_low \\\n",
"1656 198919 3 0 NaN NaN 0 NaN NaN \n", "1656 1656 198919 3 0 NaN NaN 0 NaN \n",
"\n", "\n",
" geo_insee geo_name \n", " inc100_up geo_insee geo_name \n",
"1656 FR France " "1656 NaN FR France "
] ]
}, },
"execution_count": 4, "execution_count": 12,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
......
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