Skip to content

Instantly share code, notes, and snippets.

@fuwiak
Created July 25, 2020 10:28
Show Gist options
  • Save fuwiak/36d506ac1590991b4588f5888f7d3698 to your computer and use it in GitHub Desktop.
Save fuwiak/36d506ac1590991b4588f5888f7d3698 to your computer and use it in GitHub Desktop.
def dump_to_pickle(model, filename):
import pickle
pickle.dump(model, open(filename, 'wb'))
def load_from_pickle(filename):
import pickle
loaded_model = pickle.load(open(filename, 'rb'))
return loaded_model
dump_to_pickle(dataset, "dataset.pkl")
new_df=load_from_pickle("/content/dataset.pkl")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment