title: In python how to change date format in a csv?
body: <p>I am trying to change the format of dates from <code>30-Jan-02</code> to <code>30.Jan.2002</code> occurring in second position in a csv file using python.
  I tried several things but I am confused with strings and bytes comptability.</p>
  
  <pre><code>import os 
  import csv 
  
  
  from datetime import datetime
  import sys
  from tempfile import NamedTemporaryFile
  
  with open("Filenamecsv",'r') as csvfile, NamedTemporaryFile(dir="path/parh",delete=False) as temp:
      w = csv.writer(temp)
      r = csv.reader(csvfile)
      for row in r:
          dt = row[2].split("-")
          row[2] = "{}.{}.{}".format(row[-1],row[1],row[0])
          w.writerow(row)
  move(temp.name,"Filename.csv")
  </code></pre>