From 06fe439fb65600873160127302c854d58c08c75f Mon Sep 17 00:00:00 2001 From: 451defe1a1074031578ff629b9291801 <451defe1a1074031578ff629b9291801@app-learninglab.inria.fr> Date: Wed, 16 Dec 2020 17:37:31 +0000 Subject: [PATCH] Ecriture du fichier csv --- module3/exo1/Write_csv.ipynb | 34 +++++++++++++++++++++ module3/exo1/analyse-syndrome-grippal.ipynb | 17 ++++++----- module3/exo1/incidence-PAY-3.csv | 0 3 files changed, 43 insertions(+), 8 deletions(-) create mode 100644 module3/exo1/Write_csv.ipynb create mode 100644 module3/exo1/incidence-PAY-3.csv diff --git a/module3/exo1/Write_csv.ipynb b/module3/exo1/Write_csv.ipynb new file mode 100644 index 0000000..66095f1 --- /dev/null +++ b/module3/exo1/Write_csv.ipynb @@ -0,0 +1,34 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.4" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/module3/exo1/analyse-syndrome-grippal.ipynb b/module3/exo1/analyse-syndrome-grippal.ipynb index 59d72b5..625c872 100644 --- a/module3/exo1/analyse-syndrome-grippal.ipynb +++ b/module3/exo1/analyse-syndrome-grippal.ipynb @@ -9,7 +9,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -28,10 +28,8 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": true - }, + "execution_count": 2, + "metadata": {}, "outputs": [], "source": [ "data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\"" @@ -61,12 +59,15 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "raw_data = pd.read_csv(data_url, skiprows=1)\n", - "raw_data" + "raw_data\n", + "import csv\n", + "with open('incidence-PAY-3.csv', 'w') as file:\n", + " csv.writer(file)" ] }, { @@ -364,7 +365,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.1" + "version": "3.6.4" } }, "nbformat": 4, diff --git a/module3/exo1/incidence-PAY-3.csv b/module3/exo1/incidence-PAY-3.csv new file mode 100644 index 0000000..e69de29 -- 2.18.1