I want to know if I can save an object with multiple values/properties into one pickle file or do I have to save each value independently? Here is the code I have now:
def __init__(self, id, targets, binaries):
self.id = id
self.targets = targets
self.binaries = binaries
with open('PI0_Electron_data.pickle', 'wb') as output:
pickle.dump(PiElectron, output)
For better understanding id is an integer and both targets and binaries are numpy arrays. Will I be able to get the id, targets, and binaries of the object from this single pickle file or must I create three pickle files? Also how would I extract the data from the pickle file?