application_vnd.jupyter.stderr_output_1.png
from subprocess import check_output

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import numpy as np
import pandas as pd
from IPython.display import display
import matplotlib.pyplot as plt
from datetime import date
pd.set_option('display.float_format', lambda x: '%.5f' % x)
from subprocess import check_output

sample_result = pd.read_csv('../input/sample_submission.csv')
features_to_train = sample_result.copy(deep=True)
features_to_train['air_store_id'] = features_to_train.id.str.slice(0, 20)
features_to_train['visit_date'] = pd.to_datetime(features_to_train.id.str.slice(21, 31))
features_to_train.drop(['visitors', 'id'], axis=1, inplace=True)
di = pd.read_csv('../input/date_info.csv', parse_dates=['calendar_date'])
features_to_train = pd.merge(features_to_train, di, left_on='visit_date', right_on='calendar_date', how='left')
features_to_train.drop(['calendar_date'], axis=1, inplace=True)
airstore = pd.read_csv('../input/air_store_info.csv')
features_to_train = pd.merge(features_to_train, airstore, on=['air_store_id'])
result_data_stub = features_to_train
features_to_train['year'] = features_to_train['visit_date'].dt.year
features_to_train['month'] = features_to_train['visit_date'].dt.month
features_to_train['day'] = features_to_train['visit_date'].dt.day
features_to_train = features_to_train.drop(['visit_date'], axis=1)
air_selected_store_ids = features_to_train.air_store_id.unique()

avd = pd.read_csv('../input/air_visit_data.csv', parse_dates=['visit_date'])
di = pd.read_csv('../input/date_info.csv', parse_dates=['calendar_date'])
avd_di = pd.merge(avd, di, left_on='visit_date', right_on='calendar_date', how='left')
avd_di.drop(['calendar_date'], axis=1, inplace=True)

asi = pd.read_csv('../input/air_store_info.csv')
display(asi.head())
print('Total AIR restaurents: ', len(asi))
print('Total AIR restaurents in ASI', len(asi.air_store_id.value_counts()))