Basic usage:
pickle / dill Python be used for most other data format stored objects; wherein pickle lambda functions not stored, the sequence of objects, etc., can be saved but dill. Which uses dill pickle and, like, when used, the use of
import pickle
or
import dill as pickle
Basic Usage
- save data
with open('dataset.pkl', 'wb') as f:
data = {'0':1, '1':2}
pickle.dump(data, f)
- Loading data
with open('dataset.pkl', 'rb') as f:
data = pickle.load(f)