(T)
T = 0
    folder = 'trainT-0'
T = 0
    folder = 'trainT-0'
T = 0 folder = trainT - 0
def make(T):
    """
    T = 0
    folder = 'trainT-0'
    """
    if T==-1:
        folder = 'test'
    else:
        folder = 'trainT-'+str(T)
    
    log_ = log[log.order_number_rev>T]
    
    gr = log_.groupby('product_id')
    
    items = gr.add_to_cart_order.mean().to_frame()
    items.columns = ['item_mean_pos_cart']
    items['item_sum_pos_cart'] = gr.add_to_cart_order.sum()
    items['item_min_pos_cart'] = gr.add_to_cart_order.min()
    items['item_median_pos_cart'] = gr.add_to_cart_order.median()
    items['item_max_pos_cart'] = gr.add_to_cart_order.max()
    items['item_std_pos_cart'] = gr.add_to_cart_order.std()
    items.reset_index(inplace=True)
    
    items.to_pickle('../feature/{}/f207_product.p'.format(folder))
def make ( T ) : if T == - 1 : folder = 'test' else : folder = 'trainT-' + str ( T ) log_ = log [ log . order_number_rev > T ] gr = log_ . groupby ( 'product_id' ) items = gr . add_to_cart_order . mean ( ) . to_frame ( ) items . columns = [ 'item_mean_pos_cart' ] items [ 'item_sum_pos_cart' ] = gr . add_to_cart_order . sum ( ) items [ 'item_min_pos_cart' ] = gr . add_to_cart_order . min ( ) items [ 'item_median_pos_cart' ] = gr . add_to_cart_order . median ( ) items [ 'item_max_pos_cart' ] = gr . add_to_cart_order . max ( ) items [ 'item_std_pos_cart' ] = gr . add_to_cart_order . std ( ) items . reset_index ( inplace = True ) items . to_pickle ( '../feature/{}/f207_product.p' . format ( folder ) )