From e8d6893e8b3459deeb1685ec1b75da5ced5a7b6e Mon Sep 17 00:00:00 2001 From: cb1e5ba91280d02583d0604166e71c1c Date: Sat, 4 Apr 2020 11:05:06 +0000 Subject: [PATCH] no commit message --- module3/exo3/exercice.ipynb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/module3/exo3/exercice.ipynb b/module3/exo3/exercice.ipynb index 8ee2354..976176f 100644 --- a/module3/exo3/exercice.ipynb +++ b/module3/exo3/exercice.ipynb @@ -332,26 +332,24 @@ }, { "cell_type": "code", - "execution_count": 224, + "execution_count": 229, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "Int64Index([744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755], dtype='int64')" + "Int64Index([748, 749, 750, 751, 752, 753, 754, 755], dtype='int64')" ] }, - "execution_count": 224, + "execution_count": 229, "metadata": {}, "output_type": "execute_result" } ], "source": [ "date = datetime.date.today()\n", - "date\n", - "\n", - "d = data[data.Yr == date.year && data.Mn == date.year].index\n", - "d" + "da\n", + "data.drop(data[(data.Yr == date.year) & (data.Mn > date.month)].index)\n" ] }, { -- 2.18.1