diff --git a/module3/exo3/exercice.ipynb b/module3/exo3/exercice.ipynb index 0bbbe371b01e359e381e43239412d77bf53fb1fb..8d07fdcdc46e5735dc63ce9866d4b8720ce37d3e 100644 --- a/module3/exo3/exercice.ipynb +++ b/module3/exo3/exercice.ipynb @@ -1,5 +1,512 @@ { - "cells": [], + "cells": [ + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "%matplotlib inline\n", + "import pandas as pd\n", + "import matplotlib.pyplot as plt" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "raw_data = pd.read_csv (\"https://gitlab.inria.fr/learninglab/mooc-rr/mooc-rr-ressources/-/raw/master/module3/Practical_session/Subject6_smoking.csv?inline=false\",skiprows=1)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
| \n", + " | Yes | \n", + "Alive | \n", + "21 | \n", + "
|---|---|---|---|
| 0 | \n", + "Yes | \n", + "Alive | \n", + "19.3 | \n", + "
| 1 | \n", + "No | \n", + "Dead | \n", + "57.5 | \n", + "
| 2 | \n", + "No | \n", + "Alive | \n", + "47.1 | \n", + "
| 3 | \n", + "Yes | \n", + "Alive | \n", + "81.4 | \n", + "
| 4 | \n", + "No | \n", + "Alive | \n", + "36.8 | \n", + "
| 5 | \n", + "No | \n", + "Alive | \n", + "23.8 | \n", + "
| 6 | \n", + "Yes | \n", + "Dead | \n", + "57.5 | \n", + "
| 7 | \n", + "Yes | \n", + "Alive | \n", + "24.8 | \n", + "
| 8 | \n", + "Yes | \n", + "Alive | \n", + "49.5 | \n", + "
| 9 | \n", + "Yes | \n", + "Alive | \n", + "30.0 | \n", + "
| 10 | \n", + "No | \n", + "Dead | \n", + "66.0 | \n", + "
| 11 | \n", + "Yes | \n", + "Alive | \n", + "49.2 | \n", + "
| 12 | \n", + "No | \n", + "Alive | \n", + "58.4 | \n", + "
| 13 | \n", + "No | \n", + "Dead | \n", + "60.6 | \n", + "
| 14 | \n", + "No | \n", + "Alive | \n", + "25.1 | \n", + "
| 15 | \n", + "No | \n", + "Alive | \n", + "43.5 | \n", + "
| 16 | \n", + "No | \n", + "Alive | \n", + "27.1 | \n", + "
| 17 | \n", + "No | \n", + "Alive | \n", + "58.3 | \n", + "
| 18 | \n", + "Yes | \n", + "Alive | \n", + "65.7 | \n", + "
| 19 | \n", + "No | \n", + "Dead | \n", + "73.2 | \n", + "
| 20 | \n", + "Yes | \n", + "Alive | \n", + "38.3 | \n", + "
| 21 | \n", + "No | \n", + "Alive | \n", + "33.4 | \n", + "
| 22 | \n", + "Yes | \n", + "Dead | \n", + "62.3 | \n", + "
| 23 | \n", + "No | \n", + "Alive | \n", + "18.0 | \n", + "
| 24 | \n", + "No | \n", + "Alive | \n", + "56.2 | \n", + "
| 25 | \n", + "Yes | \n", + "Alive | \n", + "59.2 | \n", + "
| 26 | \n", + "No | \n", + "Alive | \n", + "25.8 | \n", + "
| 27 | \n", + "No | \n", + "Dead | \n", + "36.9 | \n", + "
| 28 | \n", + "No | \n", + "Alive | \n", + "20.2 | \n", + "
| 29 | \n", + "Yes | \n", + "Alive | \n", + "34.6 | \n", + "
| ... | \n", + "... | \n", + "... | \n", + "... | \n", + "
| 1283 | \n", + "Yes | \n", + "Dead | \n", + "36.0 | \n", + "
| 1284 | \n", + "Yes | \n", + "Alive | \n", + "48.3 | \n", + "
| 1285 | \n", + "No | \n", + "Alive | \n", + "63.1 | \n", + "
| 1286 | \n", + "No | \n", + "Alive | \n", + "60.8 | \n", + "
| 1287 | \n", + "Yes | \n", + "Dead | \n", + "39.3 | \n", + "
| 1288 | \n", + "No | \n", + "Alive | \n", + "36.7 | \n", + "
| 1289 | \n", + "No | \n", + "Alive | \n", + "63.8 | \n", + "
| 1290 | \n", + "No | \n", + "Dead | \n", + "71.3 | \n", + "
| 1291 | \n", + "No | \n", + "Alive | \n", + "57.7 | \n", + "
| 1292 | \n", + "No | \n", + "Alive | \n", + "63.2 | \n", + "
| 1293 | \n", + "No | \n", + "Alive | \n", + "46.6 | \n", + "
| 1294 | \n", + "Yes | \n", + "Dead | \n", + "82.4 | \n", + "
| 1295 | \n", + "Yes | \n", + "Alive | \n", + "38.3 | \n", + "
| 1296 | \n", + "Yes | \n", + "Alive | \n", + "32.7 | \n", + "
| 1297 | \n", + "No | \n", + "Alive | \n", + "39.7 | \n", + "
| 1298 | \n", + "Yes | \n", + "Dead | \n", + "60.0 | \n", + "
| 1299 | \n", + "No | \n", + "Dead | \n", + "71.0 | \n", + "
| 1300 | \n", + "No | \n", + "Alive | \n", + "20.5 | \n", + "
| 1301 | \n", + "No | \n", + "Alive | \n", + "44.4 | \n", + "
| 1302 | \n", + "Yes | \n", + "Alive | \n", + "31.2 | \n", + "
| 1303 | \n", + "Yes | \n", + "Alive | \n", + "47.8 | \n", + "
| 1304 | \n", + "Yes | \n", + "Alive | \n", + "60.9 | \n", + "
| 1305 | \n", + "No | \n", + "Dead | \n", + "61.4 | \n", + "
| 1306 | \n", + "Yes | \n", + "Alive | \n", + "43.0 | \n", + "
| 1307 | \n", + "No | \n", + "Alive | \n", + "42.1 | \n", + "
| 1308 | \n", + "Yes | \n", + "Alive | \n", + "35.9 | \n", + "
| 1309 | \n", + "No | \n", + "Alive | \n", + "22.3 | \n", + "
| 1310 | \n", + "Yes | \n", + "Dead | \n", + "62.1 | \n", + "
| 1311 | \n", + "No | \n", + "Dead | \n", + "88.6 | \n", + "
| 1312 | \n", + "No | \n", + "Alive | \n", + "39.1 | \n", + "
1313 rows × 3 columns
\n", + "