no commit message

parent 4b27362e
......@@ -28,15 +28,45 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Maintenant, je vais tester si un fichier local existe déjà avant de telecharger les donnés pour eviter d'avoir des donnés répétées."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The file https://app-learninglab.inria.fr/moocrr/jupyter/user/4bb0f49ad7e02c93b7804cb2c6776886/notebooks/work/module3/exo1/incidence-PAY-3.csv does not exist\n"
]
}
],
"source": [
"from pathlib import Path\n",
"\n",
"path_to_file = 'https://app-learninglab.inria.fr/moocrr/jupyter/user/4bb0f49ad7e02c93b7804cb2c6776886/notebooks/work/module3/exo1/incidence-PAY-3.csv'\n",
"path = Path(path_to_file)\n",
"\n",
"if path.is_file():\n",
" print(f'The file {path_to_file} exists')\n",
"else:\n",
" print(f'The file {path_to_file} does not exist')"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -364,7 +394,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
"version": "3.6.4"
}
},
"nbformat": 4,
......
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