Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def datestr2num(s):
- return datetime.datetime.strptime(s, "%d-%m-%Y").date().weekday()
- dates, close = np.loadtxt('data.csv', delimiter=',', usecols=(1,6), converters={1: datestr2num}, unpack=True)
- print('Dates =', dates)
Advertisement
Add Comment
Please, Sign In to add comment