Guest User

dejt

a guest
Jul 12th, 2015
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. def datestr2num(s):
  2.     return datetime.datetime.strptime(s, "%d-%m-%Y").date().weekday()
  3.  
  4. dates, close = np.loadtxt('data.csv', delimiter=',', usecols=(1,6), converters={1: datestr2num}, unpack=True)
  5. print('Dates =', dates)
Advertisement
Add Comment
Please, Sign In to add comment