python - Load Tick Data in YYYYMMDD HHTTSSLLL format -
i trying read time series given .csv file using pandas. info describes high frequency exchange rates , of next form
time,bid,ask 20120401 170041033,1.204070,1.204190 20120401 170200097,1.204080,1.204200
where time interpret yyyymmdd hhmmsslll (and l = milliseconds). seek using next piece of code
parse = lambda x: datetime.strptime(x, '%y%m%d %h%t%s%l') ts = pd.read_csv('./tick.csv', index_col = 'time', parse_dates = 'time', date_parser = parse)
which yields error message:
'd' bad directive in format '%y%m%d %h%t%s%l'
does know error message comes from? not know why abbreviation of d 'day' should incorrect.
python pandas time-series time-format
No comments:
Post a Comment