Kaggle competition: Santander Customer Transaction Prediction
tmp=train_df[['month_id','shop_id']].groupby('shop_id' ).agg({'month_id':['min','max','nunique']})
 tmp[('month_id','laps')]=tmp[('month_id','max')]-tmp[('month_id','min')]+1
tmp=tmp.join(shops[['shop_id','shop_name','city','city_id']].set_index('shop_id'))
tmp.sort_values(by='city_id',inplace=True)
 tmp<filter>
sub_2 = pd.read_csv(".. /input/santa-kag1/lgb.csv",names=["ID_code","target"],skiprows=[0],header=None)
 sub_4 = pd.read_csv(".. /input/santa-kag1/submission_lgb.csv",names=["ID_code","target3"],skiprows=[0],header=None)
 sub_5 = pd.read_csv(".. /input/santa-kag1/submission.csv",names=["ID_code","target4"],skiprows=[0],header=None)
 sub_6 = pd.read_csv(".. /input/santa-kag1/submission_xgb1.csv",names=["ID_code","target5"],skiprows=[0],header=None)
 sub_7 = pd.read_csv(".. /input/santa-kag1/stcp2.csv",names=["ID_code","target6"],skiprows=[0],header=None)
 sub_8 = pd.read_csv(".. /input/santa-kag1/toy_sub.csv",names=["ID_code","target7"],skiprows=[0],header=None)
 sub_9 = pd.read_csv(".. /input/santa-kag1/LightGBM Minimize Leaves with GaussianNB.csv",names=["ID_code","target8"],skiprows=[0],header=None)
 sub_10 = pd.read_csv(".. /input/santa-kag1/lgbsubmission1111.csv",names=["ID_code","target9"],skiprows=[0],header=None)
 sub_11 = pd.read_csv(".. /input/santa-kag1/submission111.csv",names=["ID_code","target10"],skiprows=[0],header=None)
 sub_13 = pd.read_csv(".. /input/santa-kag1/submission_lgb_cat.csv",names=["ID_code","target12"],skiprows=[0],header=None)
 sub_14 = pd.read_csv(".. /input/santa-kag1/Customer_Transaction_rank_predictions.csv",names=["ID_code","target13"],skiprows=[0],header=None)
 sub_15 = pd.read_csv(".. /input/santa-kag1/submission_lgb1.csv",names=["ID_code","target14"],skiprows=[0],header=None)
 sub_16 = pd.read_csv(".. /input/santa-kag1/submission1.csv",names=["ID_code","target15"],skiprows=[0],header=None )
train_df.loc[(train_df['shop_id']==33)&(train_df['month_id']==19)]<set_options>
sub_2['target'] =(sub_2['target']+sub_4['target3']+sub_5['target4']+sub_6['target5']+
sub_7['target6']+sub_8['target7'] +sub_9['target8'] +sub_10['target9']
+sub_11['target10'] +sub_13['target12']+
sub_14['target13'] + +sub_15['target14'] +sub_16['target15'])/13.0
sub_2.to_csv('sol.csv',index=False)
 sub_2.head()
del tmp, tmp_test
gc.collect()<filter>
df_base = pd.merge(sub_4,sub_2,how='inner',on='ID_code')
 df_base = pd.merge(df_base,sub_5,how='inner',on='ID_code')
 df_base = pd.merge(df_base,sub_6,how='inner',on='ID_code')
 df_base = pd.merge(df_base,sub_7,how='inner',on='ID_code')
 df_base = pd.merge(df_base,sub_8,how='inner',on='ID_code')
 df_base = pd.merge(df_base,sub_9,how='inner',on='ID_code')
 df_base = pd.merge(df_base,sub_10,how='inner',on='ID_code')
 df_base = pd.merge(df_base,sub_11,how='inner',on='ID_code')
 df_base = pd.merge(df_base,sub_13,how='inner',on='ID_code')
 df_base = pd.merge(df_base,sub_14,how='inner',on='ID_code')
 df_base = pd.merge(df_base,sub_15,how='inner',on='ID_code')
 df_base = pd.merge(df_base,sub_16,how='inner',on='ID_code')
 df_base.head()