import csv
f = csv.reader(open('lmt.csv', 'r')) # open input file for reading
Date, Open, Hihh, mLow, Close, Volume = zip(*f) # split it into separate columns
Now I want to pick two dates out of the Date
column and calculate the number of days between them.
Sadly, because they are retrieved from a .csv file, they are in "'\xef\xbb\xbfDate'" format.
So when I attempted to use datetime
module, it didn't work.
One thing I can think of is have excel do the calculation by means of =DATEDIF(A2, B2, "d")
but I'd love to have a more elegant solution.