Last active
May 21, 2020 09:55
-
-
Save Farrukhraz/22a8b89d7ebb8960456fbd87107a5993 to your computer and use it in GitHub Desktop.
Object to binary file and reverse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pickle | |
with open('data.pickle', 'wb') as f: | |
pickle.dump(old_data, f, pickle.HIGHEST_PROTOCOL) | |
with open(r'C:\path\to\file.pkl', 'rb') as f: | |
new_data = pickle.load(f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment