(df, path, split_size=3, inplace=True)
return
path = '../output/mydf'
    
    wirte '../output/mydf/0.p'
          '../output/mydf/1.p'
          '../output/mydf/2.p'
path = '../output/mydf'
    
    wirte '../output/mydf/0.p'
          '../output/mydf/1.p'
          '../output/mydf/2.p'
path = .. / output / mydf wirte .. / output / mydf / 0 . p .. / output / mydf / 1 . p .. / output / mydf / 2 . p
def to_pickles(df, path, split_size=3, inplace=True):
    """
    path = '../output/mydf'
    
    wirte '../output/mydf/0.p'
          '../output/mydf/1.p'
          '../output/mydf/2.p'
    
    """
    if inplace==True:
        df.reset_index(drop=True, inplace=True)
    else:
        df = df.reset_index(drop=True)
    gc.collect()
    mkdir_p(path)
    
    kf = KFold(n_splits=split_size)
    for i, (train_index, val_index) in enumerate(tqdm(kf.split(df))):
        df.iloc[val_index].to_pickle(f'{path}/{i:03d}.p')
    return
def to_pickles ( df , path , split_size = 3 , inplace = True ) : if inplace == True : df . reset_index ( drop = True , inplace = True ) else : df = df . reset_index ( drop = True ) gc . collect ( ) mkdir_p ( path ) kf = KFold ( n_splits = split_size ) for i , ( train_index , val_index ) in enumerate ( tqdm ( kf . split ( df ) ) ) : df . iloc [ val_index ] . to_pickle ( f'{path}/{i:03d}.p' ) return