{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "outputs": [],
   "source": [
    "import pandas as pd"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [
    {
     "data": {
      "text/plain": "          日期        企业名称         地址   省份            经度            纬度  烟囱高度（m）  \\\n0 2018-10-01  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″       80   \n1 2018-10-02  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″       80   \n2 2018-10-03  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″       80   \n3 2018-10-04  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″       80   \n4 2018-10-05  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″       80   \n\n       脱硝工艺 脱硝剂名称  脱硝设备数量  ...  供热量（吉焦） 产渣量（吨） 机组运行时间（小时）  硫分（%） 脱硫副产品产量（吨）  \\\n0  SNCR SCR    氨水       3  ...  6536.83    NaN       24.0   0.51        NaN   \n1  SNCR SCR    氨水       3  ...  2484.64    NaN       24.0   0.51        NaN   \n2  SNCR SCR    氨水       3  ...  3020.83    NaN       24.0   0.51        NaN   \n3  SNCR SCR    氨水       3  ...  5599.23    NaN       24.0   0.51      72.52   \n4  SNCR SCR    氨水       3  ...  4702.65    NaN       24.0   0.51        NaN   \n\n   脱硫剂使用量（吨）  脱硫设施运行时间（小时）  脱硝还原剂消耗量（吨）  脱硝运行时间（小时）  燃料消耗量（吨）  \n0       5.06          24.0         2.98        24.0       323  \n1       5.04          24.0         2.97        24.0       218  \n2       5.04          24.0         2.95        24.0       212  \n3       5.03          24.0         2.98        24.0       223  \n4       5.06          24.0         3.01        24.0       243  \n\n[5 rows x 44 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>日期</th>\n      <th>企业名称</th>\n      <th>地址</th>\n      <th>省份</th>\n      <th>经度</th>\n      <th>纬度</th>\n      <th>烟囱高度（m）</th>\n      <th>脱硝工艺</th>\n      <th>脱硝剂名称</th>\n      <th>脱硝设备数量</th>\n      <th>...</th>\n      <th>供热量（吉焦）</th>\n      <th>产渣量（吨）</th>\n      <th>机组运行时间（小时）</th>\n      <th>硫分（%）</th>\n      <th>脱硫副产品产量（吨）</th>\n      <th>脱硫剂使用量（吨）</th>\n      <th>脱硫设施运行时间（小时）</th>\n      <th>脱硝还原剂消耗量（吨）</th>\n      <th>脱硝运行时间（小时）</th>\n      <th>燃料消耗量（吨）</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2018-10-01</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>6536.83</td>\n      <td>NaN</td>\n      <td>24.0</td>\n      <td>0.51</td>\n      <td>NaN</td>\n      <td>5.06</td>\n      <td>24.0</td>\n      <td>2.98</td>\n      <td>24.0</td>\n      <td>323</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2018-10-02</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>2484.64</td>\n      <td>NaN</td>\n      <td>24.0</td>\n      <td>0.51</td>\n      <td>NaN</td>\n      <td>5.04</td>\n      <td>24.0</td>\n      <td>2.97</td>\n      <td>24.0</td>\n      <td>218</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2018-10-03</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>3020.83</td>\n      <td>NaN</td>\n      <td>24.0</td>\n      <td>0.51</td>\n      <td>NaN</td>\n      <td>5.04</td>\n      <td>24.0</td>\n      <td>2.95</td>\n      <td>24.0</td>\n      <td>212</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2018-10-04</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>5599.23</td>\n      <td>NaN</td>\n      <td>24.0</td>\n      <td>0.51</td>\n      <td>72.52</td>\n      <td>5.03</td>\n      <td>24.0</td>\n      <td>2.98</td>\n      <td>24.0</td>\n      <td>223</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2018-10-05</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>4702.65</td>\n      <td>NaN</td>\n      <td>24.0</td>\n      <td>0.51</td>\n      <td>NaN</td>\n      <td>5.06</td>\n      <td>24.0</td>\n      <td>3.01</td>\n      <td>24.0</td>\n      <td>243</td>\n    </tr>\n  </tbody>\n</table>\n<p>5 rows × 44 columns</p>\n</div>"
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xz_daily = pd.read_excel('./data/机器学习样表.xlsx',sheet_name=0, header=[0, 1])\n",
    "old_cols = xz_daily.columns\n",
    "new_cols = [x[0].strip() if 'Unnamed' in x[1] else x[0]+'_'+x[1] for x in old_cols]\n",
    "xz_daily.columns = new_cols\n",
    "xz_daily.head()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [],
   "source": [
    "xz_daily_cols = xz_daily.columns[:30].tolist() + [\"发电量（千瓦时）\", \"供热量（吉焦）\", \"燃料消耗量（吨）\"]"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "outputs": [
    {
     "data": {
      "text/plain": "             日期        企业名称         地址   省份            经度            纬度  \\\n0    2018-10-01  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″   \n1    2018-10-02  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″   \n2    2018-10-03  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″   \n3    2018-10-04  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″   \n4    2018-10-05  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″   \n...         ...         ...        ...  ...           ...           ...   \n1173 2022-01-22  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″   \n1174 2022-01-23  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″   \n1175 2022-01-24  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″   \n1176 2022-01-25  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″   \n1177 2022-01-26  浙江秀舟热电有限公司  嘉兴市南湖区凤桥镇  浙江省  120°51′5.54″  30°39′14.76″   \n\n      烟囱高度（m）      脱硝工艺 脱硝剂名称  脱硝设备数量  ... 发电机组1_投产日期 发电机组1_汽轮机类型 发电机组1_压力参数  \\\n0          80  SNCR SCR    氨水       3  ... 2014-07-01         背压式         高压   \n1          80  SNCR SCR    氨水       3  ... 2014-07-01         背压式         高压   \n2          80  SNCR SCR    氨水       3  ... 2014-07-01         背压式         高压   \n3          80  SNCR SCR    氨水       3  ... 2014-07-01         背压式         高压   \n4          80  SNCR SCR    氨水       3  ... 2014-07-01         背压式         高压   \n...       ...       ...   ...     ...  ...        ...         ...        ...   \n1173       80  SNCR SCR    氨水       3  ... 2014-07-01         背压式         高压   \n1174       80  SNCR SCR    氨水       3  ... 2014-07-01         背压式         高压   \n1175       80  SNCR SCR    氨水       3  ... 2014-07-01         背压式         高压   \n1176       80  SNCR SCR    氨水       3  ... 2014-07-01         背压式         高压   \n1177       80  SNCR SCR    氨水       3  ... 2014-07-01         背压式         高压   \n\n      发电机组2_单机容量（MW） 发电机组2_投产日期  发电机组2_汽轮机类型  发电机组2_压力参数   发电量（千瓦时）   供热量（吉焦）  \\\n0                 15 2018-08-01          抽背式          高压  156796.00   6536.83   \n1                 15 2018-08-01          抽背式          高压  133984.00   2484.64   \n2                 15 2018-08-01          抽背式          高压  134023.00   3020.83   \n3                 15 2018-08-01          抽背式          高压  124765.00   5599.23   \n4                 15 2018-08-01          抽背式          高压  134414.00   4702.65   \n...              ...        ...          ...         ...        ...       ...   \n1173              15 2018-08-01          抽背式          高压      52.24  12472.00   \n1174              15 2018-08-01          抽背式          高压      51.36  12051.00   \n1175              15 2018-08-01          抽背式          高压      51.12  11276.00   \n1176              15 2018-08-01          抽背式          高压      49.32  11007.00   \n1177              15 2018-08-01          抽背式          高压      29.64   8132.00   \n\n      燃料消耗量（吨）  \n0          323  \n1          218  \n2          212  \n3          223  \n4          243  \n...        ...  \n1173       822  \n1174       790  \n1175       751  \n1176       672  \n1177       484  \n\n[1178 rows x 33 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>日期</th>\n      <th>企业名称</th>\n      <th>地址</th>\n      <th>省份</th>\n      <th>经度</th>\n      <th>纬度</th>\n      <th>烟囱高度（m）</th>\n      <th>脱硝工艺</th>\n      <th>脱硝剂名称</th>\n      <th>脱硝设备数量</th>\n      <th>...</th>\n      <th>发电机组1_投产日期</th>\n      <th>发电机组1_汽轮机类型</th>\n      <th>发电机组1_压力参数</th>\n      <th>发电机组2_单机容量（MW）</th>\n      <th>发电机组2_投产日期</th>\n      <th>发电机组2_汽轮机类型</th>\n      <th>发电机组2_压力参数</th>\n      <th>发电量（千瓦时）</th>\n      <th>供热量（吉焦）</th>\n      <th>燃料消耗量（吨）</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2018-10-01</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>2014-07-01</td>\n      <td>背压式</td>\n      <td>高压</td>\n      <td>15</td>\n      <td>2018-08-01</td>\n      <td>抽背式</td>\n      <td>高压</td>\n      <td>156796.00</td>\n      <td>6536.83</td>\n      <td>323</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2018-10-02</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>2014-07-01</td>\n      <td>背压式</td>\n      <td>高压</td>\n      <td>15</td>\n      <td>2018-08-01</td>\n      <td>抽背式</td>\n      <td>高压</td>\n      <td>133984.00</td>\n      <td>2484.64</td>\n      <td>218</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2018-10-03</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>2014-07-01</td>\n      <td>背压式</td>\n      <td>高压</td>\n      <td>15</td>\n      <td>2018-08-01</td>\n      <td>抽背式</td>\n      <td>高压</td>\n      <td>134023.00</td>\n      <td>3020.83</td>\n      <td>212</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2018-10-04</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>2014-07-01</td>\n      <td>背压式</td>\n      <td>高压</td>\n      <td>15</td>\n      <td>2018-08-01</td>\n      <td>抽背式</td>\n      <td>高压</td>\n      <td>124765.00</td>\n      <td>5599.23</td>\n      <td>223</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2018-10-05</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>2014-07-01</td>\n      <td>背压式</td>\n      <td>高压</td>\n      <td>15</td>\n      <td>2018-08-01</td>\n      <td>抽背式</td>\n      <td>高压</td>\n      <td>134414.00</td>\n      <td>4702.65</td>\n      <td>243</td>\n    </tr>\n    <tr>\n      <th>...</th>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n      <td>...</td>\n    </tr>\n    <tr>\n      <th>1173</th>\n      <td>2022-01-22</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>2014-07-01</td>\n      <td>背压式</td>\n      <td>高压</td>\n      <td>15</td>\n      <td>2018-08-01</td>\n      <td>抽背式</td>\n      <td>高压</td>\n      <td>52.24</td>\n      <td>12472.00</td>\n      <td>822</td>\n    </tr>\n    <tr>\n      <th>1174</th>\n      <td>2022-01-23</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>2014-07-01</td>\n      <td>背压式</td>\n      <td>高压</td>\n      <td>15</td>\n      <td>2018-08-01</td>\n      <td>抽背式</td>\n      <td>高压</td>\n      <td>51.36</td>\n      <td>12051.00</td>\n      <td>790</td>\n    </tr>\n    <tr>\n      <th>1175</th>\n      <td>2022-01-24</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>2014-07-01</td>\n      <td>背压式</td>\n      <td>高压</td>\n      <td>15</td>\n      <td>2018-08-01</td>\n      <td>抽背式</td>\n      <td>高压</td>\n      <td>51.12</td>\n      <td>11276.00</td>\n      <td>751</td>\n    </tr>\n    <tr>\n      <th>1176</th>\n      <td>2022-01-25</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>2014-07-01</td>\n      <td>背压式</td>\n      <td>高压</td>\n      <td>15</td>\n      <td>2018-08-01</td>\n      <td>抽背式</td>\n      <td>高压</td>\n      <td>49.32</td>\n      <td>11007.00</td>\n      <td>672</td>\n    </tr>\n    <tr>\n      <th>1177</th>\n      <td>2022-01-26</td>\n      <td>浙江秀舟热电有限公司</td>\n      <td>嘉兴市南湖区凤桥镇</td>\n      <td>浙江省</td>\n      <td>120°51′5.54″</td>\n      <td>30°39′14.76″</td>\n      <td>80</td>\n      <td>SNCR SCR</td>\n      <td>氨水</td>\n      <td>3</td>\n      <td>...</td>\n      <td>2014-07-01</td>\n      <td>背压式</td>\n      <td>高压</td>\n      <td>15</td>\n      <td>2018-08-01</td>\n      <td>抽背式</td>\n      <td>高压</td>\n      <td>29.64</td>\n      <td>8132.00</td>\n      <td>484</td>\n    </tr>\n  </tbody>\n</table>\n<p>1178 rows × 33 columns</p>\n</div>"
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xz_save_daily = xz_daily[xz_daily_cols].copy()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "wx_daily = pd.read_excel('./data/机器学习样表.xlsx',sheet_name=3)\n",
    "wx_daily.head(1)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "wx_daily_cols = wx_daily.columns[:16].tolist() + wx_daily.columns[17:20].tolist() + wx_daily.columns[28:30].tolist() + [wx_daily.columns[36]] + wx_daily.columns[40:43].tolist() + [wx_daily.columns[-2]] + wx_daily.columns[51:53].tolist()\n",
    "wx_daily_cols"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "wx_daily_save = wx_daily[wx_daily_cols].copy()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "hddj_daily = pd.read_excel('data/机器学习样表_单位换算.xlsx',sheet_name=5)\n",
    "hddj_daily.head(1)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "outputs": [],
   "source": [
    "hddj_daily_cols = hddj_daily.columns[:18].tolist() + hddj_daily.columns[21:23].tolist() + [hddj_daily.columns[26]] + hddj_daily.columns[28:32].tolist() + hddj_daily.columns[34:36].tolist() + [hddj_daily.columns[-1]]"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "outputs": [],
   "source": [
    "hddj_daily_save = hddj_daily[hddj_daily_cols].copy()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "outputs": [
    {
     "data": {
      "text/plain": "           企业名称     address_reg address1          经度        纬度  机组数量  \\\n0  建投遵化热电有限责任公司  河北省遵化市新店子镇程庄子村      河北省  117°58'40\"  40°4'33\"   2.0   \n\n   单机容量（MW） 生产设备类型  锅炉额定蒸发量 t/h  汽轮机类型  ... 除尘耗电量（千瓦时）.1 发电量（万千瓦时）.1  \\\n0     350.0   煤粉锅炉        1172.0   抽凝式  ...            0         0.0   \n\n  供热量（万吉焦）.1 产渣量.1  脱硫剂使用量（吨）.1 脱硫耗电量（千瓦时）.1  脱硫设施运行时间（小时）.1  脱硝还原剂消耗量（吨）.1  \\\n0          0   0.0          0.0            0               0            0.0   \n\n  脱硝运行时间（小时）.1 燃料消耗量（吨）.1  \n0            0          0  \n\n[1 rows x 55 columns]",
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>企业名称</th>\n      <th>address_reg</th>\n      <th>address1</th>\n      <th>经度</th>\n      <th>纬度</th>\n      <th>机组数量</th>\n      <th>单机容量（MW）</th>\n      <th>生产设备类型</th>\n      <th>锅炉额定蒸发量 t/h</th>\n      <th>汽轮机类型</th>\n      <th>...</th>\n      <th>除尘耗电量（千瓦时）.1</th>\n      <th>发电量（万千瓦时）.1</th>\n      <th>供热量（万吉焦）.1</th>\n      <th>产渣量.1</th>\n      <th>脱硫剂使用量（吨）.1</th>\n      <th>脱硫耗电量（千瓦时）.1</th>\n      <th>脱硫设施运行时间（小时）.1</th>\n      <th>脱硝还原剂消耗量（吨）.1</th>\n      <th>脱硝运行时间（小时）.1</th>\n      <th>燃料消耗量（吨）.1</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>建投遵化热电有限责任公司</td>\n      <td>河北省遵化市新店子镇程庄子村</td>\n      <td>河北省</td>\n      <td>117°58'40\"</td>\n      <td>40°4'33\"</td>\n      <td>2.0</td>\n      <td>350.0</td>\n      <td>煤粉锅炉</td>\n      <td>1172.0</td>\n      <td>抽凝式</td>\n      <td>...</td>\n      <td>0</td>\n      <td>0.0</td>\n      <td>0</td>\n      <td>0.0</td>\n      <td>0.0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0.0</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n  </tbody>\n</table>\n<p>1 rows × 55 columns</p>\n</div>"
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "jtzh_daily = pd.read_excel('data/机器学习样表_单位换算.xlsx',sheet_name=7)\n",
    "jtzh_daily.head(1)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "outputs": [],
   "source": [
    "jtzh_daily_cols = jtzh_daily.columns[:17].tolist() + jtzh_daily.columns[18:21].tolist() + jtzh_daily.columns[27:29].tolist() + [jtzh_daily.columns[35]] + jtzh_daily.columns[37:40].tolist() + jtzh_daily.columns[46:48].tolist() + [jtzh_daily.columns[-1]]"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "outputs": [],
   "source": [
    "jtzh_daily_save = jtzh_daily[jtzh_daily_cols].copy()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "outputs": [
    {
     "data": {
      "text/plain": "(29, 28, 33, 28)"
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(jtzh_daily_cols), len(hddj_daily_cols), len(xz_daily_cols), len(wx_daily_cols)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "outputs": [],
   "source": [
    "writer = pd.ExcelWriter('data/台账.xlsx',engine='openpyxl')\n",
    "\n",
    "xz_save_daily.to_excel(writer,\"浙江秀舟台账\")\n",
    "wx_daily_save.to_excel(writer,\"西山武乡台账\")\n",
    "hddj_daily_save.to_excel(writer,\"邯郸东郊台账\")\n",
    "jtzh_daily_save.to_excel(writer,\"建投遵化台账\")\n",
    "\n",
    "writer.save()\n",
    "writer.close()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}