{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import pandas as pd\nimport numpy as np\nimport warnings, os\nimport datetime\n\nwarnings.filterwarnings('ignore')\n                        \n","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:13:36.520509Z","iopub.execute_input":"2021-08-18T12:13:36.520832Z","iopub.status.idle":"2021-08-18T12:13:36.525015Z","shell.execute_reply.started":"2021-08-18T12:13:36.520802Z","shell.execute_reply":"2021-08-18T12:13:36.524128Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"DATA_PATH = '../input/ashrae-energy-prediction/'\n# Input data files are available in the \"../input/\" directory.\nfor dirname, _, filenames in os.walk(DATA_PATH):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:20.708330Z","iopub.execute_input":"2021-08-18T12:14:20.708644Z","iopub.status.idle":"2021-08-18T12:14:20.716088Z","shell.execute_reply.started":"2021-08-18T12:14:20.708616Z","shell.execute_reply":"2021-08-18T12:14:20.715164Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"weather_df = pd.read_csv(DATA_PATH + 'weather_train.csv') #, parse_dates=[\"timestamp\"]","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:22.453601Z","iopub.execute_input":"2021-08-18T12:14:22.453915Z","iopub.status.idle":"2021-08-18T12:14:22.755987Z","shell.execute_reply.started":"2021-08-18T12:14:22.453887Z","shell.execute_reply":"2021-08-18T12:14:22.755062Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def missing_statistics(df):    \n    statitics = pd.DataFrame(df.isnull().sum()).reset_index()\n    statitics.columns=['COLUMN NAME',\"MISSING VALUES\"]\n    statitics['TOTAL ROWS'] = df.shape[0]\n    statitics['% MISSING'] = round((statitics['MISSING VALUES']/statitics['TOTAL ROWS'])*100,2)\n    return statitics","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:26.339575Z","iopub.execute_input":"2021-08-18T12:14:26.339900Z","iopub.status.idle":"2021-08-18T12:14:26.344787Z","shell.execute_reply.started":"2021-08-18T12:14:26.339869Z","shell.execute_reply":"2021-08-18T12:14:26.344120Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"missing_statistics(weather_df)","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:26.501662Z","iopub.execute_input":"2021-08-18T12:14:26.502179Z","iopub.status.idle":"2021-08-18T12:14:26.550692Z","shell.execute_reply.started":"2021-08-18T12:14:26.502144Z","shell.execute_reply":"2021-08-18T12:14:26.550039Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"weather_df.shape","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:26.665043Z","iopub.execute_input":"2021-08-18T12:14:26.665361Z","iopub.status.idle":"2021-08-18T12:14:26.671134Z","shell.execute_reply.started":"2021-08-18T12:14:26.665332Z","shell.execute_reply":"2021-08-18T12:14:26.670201Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"52.285714285714285 * 168 * 16","metadata":{"tags":[],"execution":{"iopub.status.busy":"2021-08-18T12:14:26.832798Z","iopub.execute_input":"2021-08-18T12:14:26.833331Z","iopub.status.idle":"2021-08-18T12:14:26.839736Z","shell.execute_reply.started":"2021-08-18T12:14:26.833274Z","shell.execute_reply":"2021-08-18T12:14:26.838817Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Missing Hours\nThis csv has hourly weather information for 16 sites in 2016. So this should have 140,544 records (16 x 24 x 366, 2016 is a leap year). But this csv has 139,773 records so 771 hours of data is missing.","metadata":{"tags":[]}},{"cell_type":"markdown","source":"**All sites_id has all the weeks of the year.**","metadata":{}},{"cell_type":"code","source":"time_format = \"%Y-%m-%d %H:%M:%S\"\nstart_date = datetime.datetime.strptime(weather_df['timestamp'].min(),time_format)\nend_date = datetime.datetime.strptime(weather_df['timestamp'].max(),time_format)\nprint(start_date, end_date)","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:27.611015Z","iopub.execute_input":"2021-08-18T12:14:27.611326Z","iopub.status.idle":"2021-08-18T12:14:27.638166Z","shell.execute_reply.started":"2021-08-18T12:14:27.611299Z","shell.execute_reply":"2021-08-18T12:14:27.637217Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"total_hours = int(((end_date - start_date).total_seconds() + 3600) / 3600)\ntotal_hours","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:27.786226Z","iopub.execute_input":"2021-08-18T12:14:27.786565Z","iopub.status.idle":"2021-08-18T12:14:27.792748Z","shell.execute_reply.started":"2021-08-18T12:14:27.786531Z","shell.execute_reply":"2021-08-18T12:14:27.792002Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"correct_hours_list = [(end_date - datetime.timedelta(hours=x)).strftime(time_format) for x in range(total_hours)]\nprint(correct_hours_list[0] ,len(correct_hours_list))","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:27.946077Z","iopub.execute_input":"2021-08-18T12:14:27.946561Z","iopub.status.idle":"2021-08-18T12:14:27.984685Z","shell.execute_reply.started":"2021-08-18T12:14:27.946521Z","shell.execute_reply":"2021-08-18T12:14:27.983582Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"missing_hours = []\nfor site_id in range(16):\n    site_hours = np.array(weather_df[weather_df['site_id'] == site_id]['timestamp'])\n    new_rows = pd.DataFrame(np.setdiff1d(correct_hours_list,site_hours),columns=['timestamp'])\n    new_rows['site_id'] = site_id\n    weather_df = pd.concat([weather_df,new_rows])\n\nweather_df = weather_df.reset_index(drop=True)  ","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:28.120532Z","iopub.execute_input":"2021-08-18T12:14:28.121028Z","iopub.status.idle":"2021-08-18T12:14:47.089369Z","shell.execute_reply.started":"2021-08-18T12:14:28.120993Z","shell.execute_reply":"2021-08-18T12:14:47.088379Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"weather_df.shape","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:47.090699Z","iopub.execute_input":"2021-08-18T12:14:47.090986Z","iopub.status.idle":"2021-08-18T12:14:47.095573Z","shell.execute_reply.started":"2021-08-18T12:14:47.090944Z","shell.execute_reply":"2021-08-18T12:14:47.095014Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Add Day,Week & Month Columns\nThis dataset consits of hourly weather information. So we are going to fill missing values based on below new date features.","metadata":{"tags":[]}},{"cell_type":"code","source":"weather_df[\"datetime\"] = pd.to_datetime(weather_df[\"timestamp\"])\nweather_df[\"day\"] = weather_df[\"datetime\"].dt.day\nweather_df[\"week\"] = weather_df[\"datetime\"].dt.week\nweather_df[\"month\"] = weather_df[\"datetime\"].dt.month\nweather_df[\"hour\"] = weather_df[\"datetime\"].dt.hour","metadata":{"tags":[],"execution":{"iopub.status.busy":"2021-08-18T12:14:47.096711Z","iopub.execute_input":"2021-08-18T12:14:47.097082Z","iopub.status.idle":"2021-08-18T12:14:47.194890Z","shell.execute_reply.started":"2021-08-18T12:14:47.097053Z","shell.execute_reply":"2021-08-18T12:14:47.194025Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"Week 53 is teh first week of the data set","metadata":{}},{"cell_type":"code","source":"weather_df = weather_df.set_index(['site_id','day','month'])","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:47.196552Z","iopub.execute_input":"2021-08-18T12:14:47.196923Z","iopub.status.idle":"2021-08-18T12:14:47.224851Z","shell.execute_reply.started":"2021-08-18T12:14:47.196882Z","shell.execute_reply":"2021-08-18T12:14:47.223955Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"weather_df[weather_df[\"week\"] == 53]","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:47.226197Z","iopub.execute_input":"2021-08-18T12:14:47.226570Z","iopub.status.idle":"2021-08-18T12:14:47.260788Z","shell.execute_reply.started":"2021-08-18T12:14:47.226533Z","shell.execute_reply":"2021-08-18T12:14:47.259896Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"mask = weather_df[\"week\"] == 53\nweather_df[\"week\"][mask] = 0","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:47.261961Z","iopub.execute_input":"2021-08-18T12:14:47.262229Z","iopub.status.idle":"2021-08-18T12:14:47.272900Z","shell.execute_reply.started":"2021-08-18T12:14:47.262203Z","shell.execute_reply":"2021-08-18T12:14:47.271967Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"missing_statistics(weather_df)","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:14:47.273939Z","iopub.execute_input":"2021-08-18T12:14:47.274207Z","iopub.status.idle":"2021-08-18T12:14:47.303375Z","shell.execute_reply.started":"2021-08-18T12:14:47.274181Z","shell.execute_reply":"2021-08-18T12:14:47.302389Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Fill Air Temperature\nIdea is to fill missing air temperature with mean temperature of day of the month. Each month comes in a season and temperature varies lots in a season. So filling with yearly mean value is not a good idea.","metadata":{}},{"cell_type":"code","source":"air_temperature_filler = pd.DataFrame(weather_df.groupby(['site_id','day','month'])['air_temperature'].mean(),columns=[\"air_temperature\"])","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:15:21.877362Z","iopub.execute_input":"2021-08-18T12:15:21.877930Z","iopub.status.idle":"2021-08-18T12:15:21.898313Z","shell.execute_reply.started":"2021-08-18T12:15:21.877881Z","shell.execute_reply":"2021-08-18T12:15:21.897519Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"weather_df.update(air_temperature_filler,overwrite=False) # Only update values wich are nana","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:15:24.489852Z","iopub.execute_input":"2021-08-18T12:15:24.490422Z","iopub.status.idle":"2021-08-18T12:15:24.695278Z","shell.execute_reply.started":"2021-08-18T12:15:24.490377Z","shell.execute_reply":"2021-08-18T12:15:24.694378Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Fill Cloud Coverage\nAlmost 50% data is missing. And data is missing for most of days and even many consecutive days. So, first, calculate mean cloud coverage of day of the month and then fill rest missing values with last valid observation.","metadata":{}},{"cell_type":"code","source":"# Step 1\ncloud_coverage_filler = weather_df.groupby(['site_id','day','month'])['cloud_coverage'].mean()\n# Step 2\ncloud_coverage_filler = pd.DataFrame(cloud_coverage_filler.fillna(method='ffill'),columns=[\"cloud_coverage\"])\nweather_df.update(cloud_coverage_filler,overwrite=False)","metadata":{"tags":[],"execution":{"iopub.status.busy":"2021-08-18T12:15:30.517015Z","iopub.execute_input":"2021-08-18T12:15:30.517377Z","iopub.status.idle":"2021-08-18T12:15:30.811905Z","shell.execute_reply.started":"2021-08-18T12:15:30.517347Z","shell.execute_reply":"2021-08-18T12:15:30.811036Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cloud_coverage_filler","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:15:38.811769Z","iopub.execute_input":"2021-08-18T12:15:38.812130Z","iopub.status.idle":"2021-08-18T12:15:38.828306Z","shell.execute_reply.started":"2021-08-18T12:15:38.812099Z","shell.execute_reply":"2021-08-18T12:15:38.827347Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Fill Dew Temperature","metadata":{}},{"cell_type":"code","source":"due_temperature_filler = pd.DataFrame(weather_df.groupby(['site_id','day','month'])['dew_temperature'].mean(),columns=[\"dew_temperature\"])\nweather_df.update(due_temperature_filler,overwrite=False)","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:15:39.790210Z","iopub.execute_input":"2021-08-18T12:15:39.790521Z","iopub.status.idle":"2021-08-18T12:15:39.988674Z","shell.execute_reply.started":"2021-08-18T12:15:39.790493Z","shell.execute_reply":"2021-08-18T12:15:39.987730Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Fill Sea level Pressure","metadata":{}},{"cell_type":"code","source":"# Step 1\nsea_level_filler = weather_df.groupby(['site_id','day','month'])['sea_level_pressure'].mean()\n# Step 2\nsea_level_filler = pd.DataFrame(sea_level_filler.fillna(method='ffill'),columns=['sea_level_pressure'])\nweather_df.update(sea_level_filler,overwrite=False)","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:15:40.642341Z","iopub.execute_input":"2021-08-18T12:15:40.642661Z","iopub.status.idle":"2021-08-18T12:15:40.930827Z","shell.execute_reply.started":"2021-08-18T12:15:40.642633Z","shell.execute_reply":"2021-08-18T12:15:40.930037Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Fill Wind Direction","metadata":{}},{"cell_type":"code","source":"wind_direction_filler =  pd.DataFrame(weather_df.groupby(['site_id','day','month'])['wind_direction'].mean(),columns=['wind_direction'])\nweather_df.update(wind_direction_filler,overwrite=False)","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:15:41.566294Z","iopub.execute_input":"2021-08-18T12:15:41.566751Z","iopub.status.idle":"2021-08-18T12:15:41.766633Z","shell.execute_reply.started":"2021-08-18T12:15:41.566719Z","shell.execute_reply":"2021-08-18T12:15:41.765766Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"wind_speed_filler =  pd.DataFrame(weather_df.groupby(['site_id','day','month'])['wind_speed'].mean(),columns=['wind_speed'])\nweather_df.update(wind_speed_filler,overwrite=False)","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:15:41.958185Z","iopub.execute_input":"2021-08-18T12:15:41.958509Z","iopub.status.idle":"2021-08-18T12:15:42.247590Z","shell.execute_reply.started":"2021-08-18T12:15:41.958480Z","shell.execute_reply":"2021-08-18T12:15:42.246772Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Fill precip_depth_1_hr\nI noted this value is ignored by most of the kagglers and it has 35% missing data. This value indicates a very light and brief rain or snow, you often won't know it unless you go outside. At a moment, this value will be just a greater than zero but not measureable by rain gauge.","metadata":{}},{"cell_type":"code","source":"# Step 1\nprecip_depth_filler = weather_df.groupby(['site_id','day','month'])['precip_depth_1_hr'].mean()\n# Step 2\nprecip_depth_filler = pd.DataFrame(precip_depth_filler.fillna(method='ffill'),columns=['precip_depth_1_hr'])\nweather_df.update(precip_depth_filler,overwrite=False)","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:15:43.512284Z","iopub.execute_input":"2021-08-18T12:15:43.512605Z","iopub.status.idle":"2021-08-18T12:15:43.709340Z","shell.execute_reply.started":"2021-08-18T12:15:43.512577Z","shell.execute_reply":"2021-08-18T12:15:43.708493Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"weather_df = weather_df.reset_index()\nweather_df = weather_df.drop(['datetime','day','week','month'],axis=1)\nweather_df","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:15:44.896394Z","iopub.execute_input":"2021-08-18T12:15:44.896715Z","iopub.status.idle":"2021-08-18T12:15:44.935603Z","shell.execute_reply.started":"2021-08-18T12:15:44.896686Z","shell.execute_reply":"2021-08-18T12:15:44.934957Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Count Missing Values","metadata":{}},{"cell_type":"code","source":"missing_statistics(weather_df)","metadata":{"tags":[],"execution":{"iopub.status.busy":"2021-08-18T12:15:46.478311Z","iopub.execute_input":"2021-08-18T12:15:46.478838Z","iopub.status.idle":"2021-08-18T12:15:46.501967Z","shell.execute_reply.started":"2021-08-18T12:15:46.478780Z","shell.execute_reply":"2021-08-18T12:15:46.501065Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def fill_weather_dataset(weather_df):\n    \n    # Find Missing Dates\n    time_format = \"%Y-%m-%d %H:%M:%S\"\n    start_date = datetime.datetime.strptime(weather_df['timestamp'].min(),time_format)\n    end_date = datetime.datetime.strptime(weather_df['timestamp'].max(),time_format)\n    total_hours = int(((end_date - start_date).total_seconds() + 3600) / 3600)\n    hours_list = [(end_date - datetime.timedelta(hours=x)).strftime(time_format) for x in range(total_hours)]\n\n    missing_hours = []\n    for site_id in range(16):\n        site_hours = np.array(weather_df[weather_df['site_id'] == site_id]['timestamp'])\n        new_rows = pd.DataFrame(np.setdiff1d(hours_list,site_hours),columns=['timestamp'])\n        new_rows['site_id'] = site_id\n        weather_df = pd.concat([weather_df,new_rows])\n\n        weather_df = weather_df.reset_index(drop=True)           \n\n    # Add new Features\n    weather_df[\"datetime\"] = pd.to_datetime(weather_df[\"timestamp\"])\n    weather_df[\"day\"] = weather_df[\"datetime\"].dt.day\n    weather_df[\"week\"] = weather_df[\"datetime\"].dt.week\n    weather_df[\"month\"] = weather_df[\"datetime\"].dt.month\n    \n    # Reset Index for Fast Update\n    weather_df = weather_df.set_index(['site_id','day','month'])\n\n    air_temperature_filler = pd.DataFrame(weather_df.groupby(['site_id','day','month'])['air_temperature'].mean(),columns=[\"air_temperature\"])\n    weather_df.update(air_temperature_filler,overwrite=False)\n\n    # Step 1\n    cloud_coverage_filler = weather_df.groupby(['site_id','day','month'])['cloud_coverage'].mean()\n    # Step 2\n    cloud_coverage_filler = pd.DataFrame(cloud_coverage_filler.fillna(method='ffill'),columns=[\"cloud_coverage\"])\n\n    weather_df.update(cloud_coverage_filler,overwrite=False)\n\n    due_temperature_filler = pd.DataFrame(weather_df.groupby(['site_id','day','month'])['dew_temperature'].mean(),columns=[\"dew_temperature\"])\n    weather_df.update(due_temperature_filler,overwrite=False)\n\n    # Step 1\n    sea_level_filler = weather_df.groupby(['site_id','day','month'])['sea_level_pressure'].mean()\n    # Step 2\n    sea_level_filler = pd.DataFrame(sea_level_filler.fillna(method='ffill'),columns=['sea_level_pressure'])\n\n    weather_df.update(sea_level_filler,overwrite=False)\n\n    wind_direction_filler =  pd.DataFrame(weather_df.groupby(['site_id','day','month'])['wind_direction'].mean(),columns=['wind_direction'])\n    weather_df.update(wind_direction_filler,overwrite=False)\n\n    wind_speed_filler =  pd.DataFrame(weather_df.groupby(['site_id','day','month'])['wind_speed'].mean(),columns=['wind_speed'])\n    weather_df.update(wind_speed_filler,overwrite=False)\n\n    # Step 1\n    precip_depth_filler = weather_df.groupby(['site_id','day','month'])['precip_depth_1_hr'].mean()\n    # Step 2\n    precip_depth_filler = pd.DataFrame(precip_depth_filler.fillna(method='ffill'),columns=['precip_depth_1_hr'])\n\n    weather_df.update(precip_depth_filler,overwrite=False)\n\n    weather_df = weather_df.reset_index()\n    weather_df = weather_df.drop(['datetime','day','week','month'],axis=1)\n        \n    return weather_df","metadata":{"tags":[],"execution":{"iopub.status.busy":"2021-08-18T12:15:46.640291Z","iopub.execute_input":"2021-08-18T12:15:46.640610Z","iopub.status.idle":"2021-08-18T12:15:46.653992Z","shell.execute_reply.started":"2021-08-18T12:15:46.640580Z","shell.execute_reply":"2021-08-18T12:15:46.653225Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"weather_train_df = pd.read_csv(DATA_PATH + 'weather_train.csv')\nweather_test_df = pd.read_csv(DATA_PATH + 'weather_test.csv')\n\nweather_train_df = fill_weather_dataset(weather_train_df)\nweather_test_df = fill_weather_dataset(weather_test_df)","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:15:47.933581Z","iopub.execute_input":"2021-08-18T12:15:47.934073Z","iopub.status.idle":"2021-08-18T12:17:20.745297Z","shell.execute_reply.started":"2021-08-18T12:15:47.934040Z","shell.execute_reply":"2021-08-18T12:17:20.744406Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"weather_train_df","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:17:20.746547Z","iopub.execute_input":"2021-08-18T12:17:20.746806Z","iopub.status.idle":"2021-08-18T12:17:20.763593Z","shell.execute_reply.started":"2021-08-18T12:17:20.746772Z","shell.execute_reply":"2021-08-18T12:17:20.762823Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## Generating new csv files","metadata":{}},{"cell_type":"code","source":"# weather_train_df.to_csv(DATA_PATH + 'weather_train_filled.csv', index=False)\n# weather_test_df.to_csv(DATA_PATH + 'weather_test_filled.csv', index=False)","metadata":{"execution":{"iopub.status.busy":"2021-08-18T12:17:20.764917Z","iopub.execute_input":"2021-08-18T12:17:20.765202Z","iopub.status.idle":"2021-08-18T12:17:20.775121Z","shell.execute_reply.started":"2021-08-18T12:17:20.765174Z","shell.execute_reply":"2021-08-18T12:17:20.774493Z"},"trusted":true},"execution_count":null,"outputs":[]}]}