I have a pandas DataSeries that contains a string formatted date in the form of:
2016-01-14 11:39:54
I would like to convert the string to a timestamp.
I am using the apply
method to attemp to pass 'datetime.strptime' to each element of the series
date_series = date_string.apply(datetime.strptime, args=('%Y-%m-%d %H:%M:%S'))
When I run the code, I get the following error:
strptime() takes exactly 2 arguments (18 given)
my questions are (1) am I taking the correct approach, (2) why is strptime
converting my args into 18 arguments?