I have this pickle file https://github.com/Nilabhra/ethnicity/blob/master/models/ethnicity_classifier_last_name.pkl which is generated from json file https://github.com/Nilabhra/ethnicity/blob/master/json_counts/last_name_ethnicity.json
My question: How to remove old dataset and put new dataset in .pkl file.
import pickle
ethinicity= {"Kumari": {"Hindu,Brahmin": 1.0},"Choopra": {"Jain,Digambar": 1.0}}
pickle.dump(ethinicity, open("ethnicity_classifier_last_name.pkl", "wb"))
however the pickle file generated by above code has a different structure, hence its throwing error when i run this code