diff --git a/module3/exo3/exercice.ipynb b/module3/exo3/exercice.ipynb index 8ee2354d3be662a76b499ec4b546c99dd6dfefdd..976176f99e07df98ada623d08d96a5ab7bac4bdb 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" ] }, {