From 2a945850a8bd28162355c6cc5808d140928872e1 Mon Sep 17 00:00:00 2001 From: 521adc37f04e8509ebf5ce131815aa0a <521adc37f04e8509ebf5ce131815aa0a@app-learninglab.inria.fr> Date: Mon, 8 Feb 2021 09:15:04 +0000 Subject: [PATCH] =?UTF-8?q?Voir=20les=20lignes=20avec=20des=20donn=C3=A9es?= =?UTF-8?q?=20manquantes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module3/exo3/exercice.ipynb | 89 ++++++++++++++++++++++++++++++++++--- 1 file changed, 83 insertions(+), 6 deletions(-) diff --git a/module3/exo3/exercice.ipynb b/module3/exo3/exercice.ipynb index 58478ef..c995249 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)]" ] }, { -- 2.18.1