Answers for "load pickle to a variable"

1

load pickle to a variable

import pickle
with open(filename, 'rb') as f:
    var_you_want_to_load_into = pickle.load(f)
Posted by: Guest on February-07-2021
0

how to save python variables locally

with open('train.pickle', 'wb') as f:
    pickle.dump([X_train, y_train], f)
Posted by: Guest on June-19-2020

Browse Popular Code Answers by Language