I have a df time series. I extracted the indexes and want to convert them each to datetime. How do you go about doing that? I tried to use pa
Just an update to the question, I have tried the most upvoted answer, and it gives me this warning
usr/local/lib/python3.5/dist-packages/IPython/core/interactiveshell.py:2910: FutureWarning: to_datetime is deprecated. Use self.to_pydatetime() exec(code_obj, self.user_global_ns, self.user_ns)
And suggest me to use to_pydatetime()
For example
sample = Timestamp('2018-05-02 10:08:54.774000')
sample.to_datetime() will return datetime.datetime(2018, 4, 30, 10, 8, 54, 774000)