From f2e049936a02d2599c564b5efb65d68a6db7e5f6 Mon Sep 17 00:00:00 2001 From: benjas <909336740@qq.com> Date: Mon, 21 Dec 2020 21:34:06 +0800 Subject: [PATCH] =?UTF-8?q?Add=20=E5=A4=84=E7=90=86=E7=BC=BA=E5=A4=B1?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../建筑能源利用率预测.ipynb | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/机器学习竞赛实战_优胜解决方案/建筑能源利用率预测/建筑能源利用率预测.ipynb b/机器学习竞赛实战_优胜解决方案/建筑能源利用率预测/建筑能源利用率预测.ipynb index 9954026..4194fc4 100644 --- a/机器学习竞赛实战_优胜解决方案/建筑能源利用率预测/建筑能源利用率预测.ipynb +++ b/机器学习竞赛实战_优胜解决方案/建筑能源利用率预测/建筑能源利用率预测.ipynb @@ -1903,15 +1903,42 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Your selected dataframe has 60 columns.\n", + "There are 46 columns that have missing values.\n", + "We will remove 11 columns.\n" + ] + } + ], "source": [ - "# Get the columns with > 50% m\n", + "# Get the columns with > 50% missing\n", "missing_df = missing_values_table(data);\n", "missing_columns = list(missing_df[missing_df['% of Total Values']> 50].index)\n", "print('We will remove %d columns.'% len(missing_columns))" ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "# Drop the columns\n", + "data = data.drop(columns = list(missing_columns))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": {