I am struggling to get my code running. There seems to be a problem with the timestamp. Do you have any suggestions to how I could change my code? I saw that this had been asked before, but did not manage to make it work.
This is the error I get when running the code: 'Timestamp' object has no attribute 'timestamp'
My code:
import quandl, math, datetime
last_date = df.iloc[-1].name
last_unix = last_date.timestamp()
one_day = 86400 #Seconds in a day
next_unix = last_unix + one_day
for i in forecast_set:
next_date = datetime.datetime.fromtimestamp(next_unix)
next_unix += one_day
df.loc[next_date]=[np.nan for _ in range(len(df.columns)-1)]+[i]
#Loop to replace all numbers on x axis with dates