import joblib
data_dictionary = {'books': 12, 'articles': 100, 'subjects': ['math', 'programming', 'data science']}
joblib.dump(value=data_dictionary, filename='readings.job', compress=True)
data = joblib.load(filename='readings.job')
data
%%timeit
joblib.dump(value=data_dictionary, filename='readings.job', compress=True)
%%timeit
import pickle as pk
with open('readings.pk', 'wb') as f:
pk.dump(data_dictionary, f)
%%timeit
data = joblib.load(filename='readings.job')
%%timeit
import pickle as pk
with open('readings.pk', 'rb') as f:
data = pk.load(f)
No comments:
Post a Comment