I am trying to run below code but everytime I am getting a typing error.
def parse(x):
return datetime.strptime(x, '%Y %-m %-d %-H:%-M:%-S')
dataset = read_csv('ID1887011.csv', delimiter=",", parse_dates = [['year',
'month','day','hours','minutes', 'seconds']],
index_col=0, date_parser=parse)
Hi I made some changes in the code and now its working.
dataset = pd.read_csv('ID1887011.csv', delimiter=",", index_col='datetime',
parse_dates = {'datetime': [1,2,3,4,5,6]}, date_parser=lambda x:
pd.datetime.strptime(x, '%Y %m %d %H %M %S'))
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.