From 4041c3d47cb76a56e7d44a96b83f0d42eb9882a9 Mon Sep 17 00:00:00 2001 From: 93bddc7315f700347e10fb4afd2d4053 <93bddc7315f700347e10fb4afd2d4053@app-learninglab.inria.fr> Date: Wed, 6 May 2020 10:03:24 +0000 Subject: [PATCH] bloc try and except --- module3/exo1/analyse-syndrome-grippal.ipynb | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/module3/exo1/analyse-syndrome-grippal.ipynb b/module3/exo1/analyse-syndrome-grippal.ipynb index 1526dbc..5c1f1d4 100644 --- a/module3/exo1/analyse-syndrome-grippal.ipynb +++ b/module3/exo1/analyse-syndrome-grippal.ipynb @@ -1046,7 +1046,13 @@ } ], "source": [ - "raw_data = pd.read_csv(data_2, skiprows=1)\n", + "try:\n", + " raw_data = pd.read_csv(data_2, skiprows=1)\n", + "except:\n", + " try:\n", + " raw_data = pd.read_csv(data_url, skiprows=1)\n", + " except:\n", + " print(\"Error : the file doesn't exist\")\n", "raw_data" ] }, @@ -2223,7 +2229,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 10, @@ -2262,7 +2268,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 11, @@ -2366,7 +2372,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 14, @@ -2467,7 +2473,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 16, -- 2.18.1