I am quite new to Python and especially to pickling. For an interview data challenge, I was sent a dataset in pickled format but I am having problems unpickling it. They told me the file was pickled on a Mac in Python 3.7. I am using python 3.6.5.
I am using the following code:
import pickle
infile = open('test_data.pickle', 'rb')
pickle.load(infile)
but am then getting the error:
"Invalid load key \xef"
I have read online and tried things such as pickle.load(infile, encoding='bytes') or the same but with 'latin1' instead of bytes. I haven't found any solutions to my problem online or in any other stack exchange questions, so any help would be much appreciated!
Thank you!
Isabel