diff --git a/module3/exo3/exercice.ipynb b/module3/exo3/exercice.ipynb index 58478efb1e5bdca18ff2bb1a017bee4ed849c24a..c995249313174577ec7181d9dde3b9263fdb7004 100644 --- a/module3/exo3/exercice.ipynb +++ b/module3/exo3/exercice.ipynb @@ -9,18 +9,19 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", - "import matplotlib.pyplot as plt" + "import matplotlib.pyplot as plt\n", + "%matplotlib inline" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -483,14 +484,90 @@ "52 53 1821 54.0 NaN" ] }, - "execution_count": 2, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "df = pd.read_csv('https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/master/csv/HistData/Wheat.csv')\n", - "df" + "data = pd.read_csv('https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/master/csv/HistData/Wheat.csv')\n", + "data" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Unnamed: 0YearWheatWages
5051181578.0NaN
5152182054.0NaN
5253182154.0NaN
\n", + "
" + ], + "text/plain": [ + " Unnamed: 0 Year Wheat Wages\n", + "50 51 1815 78.0 NaN\n", + "51 52 1820 54.0 NaN\n", + "52 53 1821 54.0 NaN" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Voir les lignes avec des données manquantes\n", + "\n", + "data[data.isnull().any(axis = 1)]" ] }, {