Why I get the error in the below code:
there is a column and I want to implement Timestamp on it:
df['date']
0 2014-09-04 00:00:00
1 2014-09-12 00:00:00
2 2014-09-04 00:00:00
3 2014-09-05 00:00:00
4 2014-09-06 00:00:00
...
1049 2015-09-16 00:00:00
1050 2015-10-13 00:00:00
1051 2015-10-13 00:00:00
1052 2015-10-22 00:00:00
1053 2015-10-20 00:00:00
Name: date, Length: 1054, dtype: object
df['date']=df['date'].agg(pd.Timestamp)
Here is the given error:
TypeError: Cannot convert input
[0 2014-09-04 00:00:00
1 2014-09-12 00:00:00
2 2014-09-04 00:00:00
3 2014-09-05 00:00:00
4 2014-09-06 00:00:00
...
1049 2015-09-16 00:00:00
1050 2015-10-13 00:00:00
1051 2015-10-13 00:00:00
1052 2015-10-22 00:00:00
1053 2015-10-20 00:00:00
Name: date, Length: 1054, dtype: object] of type <class 'pandas.core.series.Series'> to Timestamp