on-internet
← Community

Pickle encoding utf-8 issue

Stack Overflow ·

I'm trying to pickle a pandas dataframe to my local directory so I can work on it in another jupyter notebook. The write appears to go successful at first but when trying to read it in a new jupyter notebook the read is unsuccessful. When I open the pickle file I appear to have wrote, the file's only contents are: Error! /Users/.../income.pickle is not UTF-8 encoded Saving disabled. See console for more details. I also checked and the pickle file itself is only a few kilobytes. Here's my code for writing the pickle: with open('income.pickle', 'wb', encoding='UTF-8') as to_write: pickle.dump(ne

Comments

Sign in or sign up to comment and upvote.

No comments yet.