def to_pickle(obj, path):
    with open(path, 'wb') as f:
        pkl.dump(obj, f, protocol=pkl.HIGHEST_PROTOCOL)
Pickle (serialize) object to input file path
dataset/ETHPy150Open pydata/pandas/pandas/io/pickle.py/to_pickle