title: How to convert an array of dates (format 'mm/dd/yy HH:MM:SS') to numerics?
body: <p>I have recently (1 week) decided to migrate my work to Python from matlab. Since I am used to matlab, I am finding it difficult sometimes to get the exact equivalent of what I want to do in python.  </p>
  
  <p>Here's my problem:</p>
  
  <p>I have a set of csv files that I want to process. So far, I have succeeded in loading them into groups. Each column has a size of more 600000 x 1. In one of the columns in the csv file is the time which has a format of 'mm/dd/yy HH:MM:SS'. I want to convert the time column to number and I am using date2num from matplot lib for that. Is there a 'matrix' way of doing it? The command in matlab for doing that is datenum(time, 'mm/dd/yyyy HH:MM:SS') where time is a 600000 x 1 matrix.</p>
  
  <p>Thanks </p>
  
  <p>Here is an example of the code that I am talking about: </p>
  
  <pre><code>import csv
  import time
  import datetime from datetime
  import date from matplotlib.dates
  import date2num
  
  time = []
  otherColumns = []
  
  for d in csv.DictReader(open('MyFile.csv')):
        time.append(str(d['time']))
        otherColumns.append(float(d['otherColumns']))
  
  timeNumeric = date2num(datetime.datetime.strptime(time,"%d/%m/%y %H:%M:%S" ))
  </code></pre>