Skip to content

Instantly share code, notes, and snippets.

@viper25
Last active November 1, 2022 10:02
Show Gist options
  • Save viper25/e6193a9c6ec2a040aa29f4a242d4b09d to your computer and use it in GitHub Desktop.
Save viper25/e6193a9c6ec2a040aa29f4a242d4b09d to your computer and use it in GitHub Desktop.
Pickle a File
# Write to pickle
import pickle
filehandler = open(b"df_items.obj","wb")
pickle.dump(df_items,filehandler)
filehandler.close()
# Read
filehandler = open("df_items.obj",'rb')
df_items = pickle.load(filehandler)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment