How to read csv file with string but convert to different type and send to an array in python?
<p>I have a csv file, contain datetime, number1, number2, number3 number4.</p>

<p>I use code to read, but how to change the types.</p>

<p>my code:</p>

<pre><code>import csv
import datetime
myarray=([])
filename='Contract.csv'
f=csv.reader(open(filename,'rb'), delimiter=',')
for row in f:
    myarray=array([row for row in f])
print myarray
</code></pre>

<p>I get the array looks like:
[['2010-05-01 15:20:12 0000' '345' '234' '163' '120'],
 ['2010-05-02 15:22:12 0000' '335' '214' '164' '120'],
...
]</p>

<p>I have no idea how to change the first column into datetime and the others into float.
Please help.
Thanks</p>
