Answers for "how to read in a pickle file"

8

read pickle file

with open('filename', 'rb') as f:
    x = pickle.load(f)
Posted by: Guest on August-26-2020
5

pickle save

import pickle

pickle.dump( favorite_color, open( "save.p", "wb" ) )
favorite_color = pickle.load( open( "save.p", "rb" ) )
Posted by: Guest on October-05-2020

Python Answers by Framework

Browse Popular Code Answers by Language