text_plain_output_1.png image_output_1.png
import pandas as pd

elec_meter_data_all = pd.read_csv('../input/buildingdatagenomeproject2/electricity.csv', index_col='timestamp', parse_dates=True)

site_data_example = elec_meter_data_all.loc[:, elec_meter_data_all.columns.str.contains('Panther') & elec_meter_data_all.columns.str.contains('office')]
site_data_example_2017 = site_data_example.truncate(before='2017-01-01')

weather_data = pd.read_csv('../input/buildingdatagenomeproject2/weather.csv', index_col='timestamp', parse_dates=True)

weather_data_site = weather_data[weather_data.site_id == 'Panther']

sample_meter = pd.DataFrame(site_data_example_2017['Panther_office_Lavinia'])

sample_meter_nooutlier = sample_meter[sample_meter > 10]

sample_meter_nooutlier_nogaps = sample_meter_nooutlier.fillna(method='ffill')

temp_data = pd.DataFrame(weather_data_site['airTemperature'].truncate(before='01-01-2017'))

comparison = pd.concat([temp_data, sample_meter_nooutlier_nogaps], axis=1)

comparison.head()