From e4c01435e1feffc9194e8d2986bf7161c811d5fc Mon Sep 17 00:00:00 2001 From: f969076062e7e87452e3220760453367 Date: Tue, 28 Apr 2020 10:08:11 +0000 Subject: [PATCH] Nouvel essai --- module2/exo4/exercice.ipynb | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/module2/exo4/exercice.ipynb b/module2/exo4/exercice.ipynb index 00a6362..10839a3 100644 --- a/module2/exo4/exercice.ipynb +++ b/module2/exo4/exercice.ipynb @@ -9,7 +9,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 102, "metadata": {}, "outputs": [ { @@ -17,10 +17,10 @@ "output_type": "stream", "text": [ "['\\ufeffFormulation', 'Référence', '70%C', '50%C', '30%C']\n", - "['Rc24h', '24.7', '19.8', '14.5', '9.9']\n", - "['Rc7j', '60.2', '55.7', '39.4', '28.6']\n", - "['Rc28j', '81.6', '75.6', '55.8', '42.7']\n", - "['Rc90j', '87.5', '79.8', '61.2', '49.8']\n" + "['Rc24h', '24.70', '19.80', '14.50', '9.90']\n", + "['Rc7j', '60.20', '55.70', '39.40', '28.60']\n", + "['Rc28j', '81.60', '75.60', '55.80', '42.70']\n", + "['Rc90j', '87.50', '79.80', '61.20', '49.80']\n" ] } ], @@ -35,6 +35,31 @@ " print(row)" ] }, + { + "cell_type": "code", + "execution_count": 104, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "24.70\n", + "60.20\n", + "81.60\n", + "87.50\n" + ] + } + ], + "source": [ + "import csv\n", + "fname = \"DonneesExo.csv\"\n", + "with open(fname,newline='') as file:\n", + " reader = csv.DictReader(file)\n", + " for row in reader:\n", + " print(row['Référence'])" + ] + }, { "cell_type": "code", "execution_count": 77, -- 2.18.1