Exercide 3 (1re partie)_1er essai

parent 270d9a5d
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
"%matplotlib inline\n", "%matplotlib inline\n",
"import matplotlib.pyplot as plt\n", "import matplotlib.pyplot as plt\n",
"import pandas as pd\n", "import pandas as pd\n",
"import isoweek" "import isoweek\n",
"import os"
] ]
}, },
{ {
...@@ -69,6 +70,31 @@ ...@@ -69,6 +70,31 @@
"raw_data" "raw_data"
] ]
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Je fais un fichier de sauvegarde des données"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"output_name = \"Sauvegarde_donnees_syndrome_grippal\"\n",
"output_file = os.path(output_name+'.csv')\n",
"if output_file.exists ():\n",
" print(\"output file exists already\")\n",
" raw_data = pd.read_csv(output_file)\n",
"else:\n",
" print(\"output file created\")\n",
" raw_data = pd.read_csv(data_url, skiprows=1)\n",
" raw_data.to_csv(output_name+'.csv')\n",
"raw_data"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
...@@ -364,7 +390,7 @@ ...@@ -364,7 +390,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.6.1" "version": "3.6.4"
} }
}, },
"nbformat": 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