I have a csv file(delimiter=,) containing following fields
filename labels
xyz.png cat
pqz.png dog
abc.png mouse
there is a list containing all the classes
data-classes = ["cat", "dog", "mouse"]
Question : How to replace the string labels in csv with the index of the labels data-classes (i.e. if label == cat
then label should change to 0 ) and save it in csv file.