use pickle to save data python code example
Example 1: create pickle file python
import pickle
file_name='my_file.pkl'
f = open(file_name,'wb')
pickle.dump(my_data,f)
f.close()
Example 2: how to save python variables locally
with open('train.pickle', 'wb') as f:
pickle.dump([X_train, y_train], f)