def to_pickle(obj, path):
 with open(path, 'wb') as f:
  pkl.dump(obj, f, protocol=pkl.HIGHEST_PROTOCOL)

def to_pickle ( obj , path ) : with open ( path , 'wb' ) as f : pkl . dump ( obj , f , protocol = pkl . HIGHEST_PROTOCOL )
pickle object to input file path parameters obj : any object path : string file path .