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