strptime() argument 1 must be str code example
Example: TypeError: strptime() argument 1 must be str, not Series
train['date1'] = train['ID'].apply(lambda x: datetime.strptime(x, '%Y%m%d%H'))
train['date1'] = train['ID'].apply(lambda x: datetime.strptime(x, '%Y%m%d%H'))