Skip to content

Instantly share code, notes, and snippets.

@wkarney
Last active February 24, 2020 21:05
Show Gist options
  • Save wkarney/8d6d92af2f970822eaa1187e1a3967e7 to your computer and use it in GitHub Desktop.
Save wkarney/8d6d92af2f970822eaa1187e1a3967e7 to your computer and use it in GitHub Desktop.
[Pickling in Python] #pickle #python #basics #deployment
# Python pickling example:
import pickle
with open('pickledfile.pickle', 'wb') as f:
pickle.dump(model, f, pickle.HIGHEST_PROTOCOL)
with open('pickledfile.pickle', 'rb') as f:
model = pickle.load(f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment