no commit message

parent e729f33d
...@@ -62,17 +62,29 @@ ...@@ -62,17 +62,29 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 18, "execution_count": 24,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"fichier enregister pour la premiére fois\n"
]
}
],
"source": [ "source": [
"nom_fichier = \"syndrome_gripal.csv\"\n", "nom_fichier = \"syndrome_gripal.csv\"\n",
"\n", "\n",
"try:\n", "try: \n",
" #on essaye de lire le fichier local\n",
" raw_data = pd.read_csv(nom_fichier, skiprows=1)\n", " raw_data = pd.read_csv(nom_fichier, skiprows=1)\n",
"except FileNotFoundError:\n", " print(\"fichier chargé\")\n",
"except FileNotFoundError: \n",
" #si le fichier n'existe pas on le crée\n",
" raw_data = pd.read_csv(data_url, skiprows=1)\n", " raw_data = pd.read_csv(data_url, skiprows=1)\n",
" raw_data.to_csv(nom_fichier, index=False)\n", " raw_data.to_csv(nom_fichier, index=False)\n",
" print(\"fichier enregister pour la premiére fois\")\n",
"\n", "\n",
" " " "
] ]
......
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