I have a csv file, contain datetime, number1, number2, number3 number4.
I use code to read, but how to change the types.
my 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
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'], ... ]
I have no idea how to change the first column into datetime and the others into float. Please help. Thanks