bloc try and except

parent 458f16a7
...@@ -1046,7 +1046,13 @@ ...@@ -1046,7 +1046,13 @@
} }
], ],
"source": [ "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" "raw_data"
] ]
}, },
...@@ -2223,7 +2229,7 @@ ...@@ -2223,7 +2229,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f37bcca7748>" "<matplotlib.axes._subplots.AxesSubplot at 0x7f356d713748>"
] ]
}, },
"execution_count": 10, "execution_count": 10,
...@@ -2262,7 +2268,7 @@ ...@@ -2262,7 +2268,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f37baa82518>" "<matplotlib.axes._subplots.AxesSubplot at 0x7f356b550be0>"
] ]
}, },
"execution_count": 11, "execution_count": 11,
...@@ -2366,7 +2372,7 @@ ...@@ -2366,7 +2372,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f37ba987978>" "<matplotlib.axes._subplots.AxesSubplot at 0x7f356b45d1d0>"
] ]
}, },
"execution_count": 14, "execution_count": 14,
...@@ -2467,7 +2473,7 @@ ...@@ -2467,7 +2473,7 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f37ba96b390>" "<matplotlib.axes._subplots.AxesSubplot at 0x7f356b43af98>"
] ]
}, },
"execution_count": 16, "execution_count": 16,
......
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