Commentaire

parent 979cce74
......@@ -39,6 +39,25 @@
"data_path = 'incidence-PAY-3.csv'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Si le fichier de données n'existez pas on le télécharge. Cela permet de conserver mes données telles qu'elles étaient lors de la réalisation de cette analyse."
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [],
"source": [
"if not exists(data_path):\n",
" print('Download file')\n",
" res = requests.get(data_url, allow_redirects=True)\n",
" open(data_path, 'wb').write(res.content)"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -63,7 +82,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 16,
"metadata": {},
"outputs": [
{
......@@ -1028,17 +1047,12 @@
"[1988 rows x 10 columns]"
]
},
"execution_count": 13,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"if not exists(data_path):\n",
" print('Download file')\n",
" res = requests.get(data_url, allow_redirects=True)\n",
" open(data_path, 'wb').write(res.content)\n",
" \n",
"raw_data = pd.read_csv(data_path, skiprows=1)\n",
"raw_data"
]
......@@ -1059,6 +1073,13 @@
"raw_data[raw_data.isnull().any(axis=1)]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
......
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