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
In my case I could not get a correct output even when specifying the format: I used to get always the year 1970.
Actually what solved my problem was to specify the unit parameter to the function since my timestamps have seconds granularity:
df_new = df
df_new['time'] = pandas.to_datetime(df['time'], unit='s')