I'm trying to use AWS Amazon Forecast but am running into an error when I'm running the Amazon Forecast Quickstart guide.
This is the code:
results_df = pd.DataFrame(columns=['timestamp', 'value', 'source'])
for index, row in actuals.iterrows():
clean_timestamp = dateutil.parser.parse(row['timestamp'])
results_df = results_df.append({'timestamp' : clean_timestamp , 'value' : row['target_value'], 'source': 'actual'} , ignore_index=True)
for index, row in forecasts_p10_df.iterrows():
clean_timestamp = dateutil.parser.parse(row['Timestamp'])
results_df = results_df.append({'timestamp' : clean_timestamp , 'value' : row['Value'], 'source': 'p10'} , ignore_index=True)
for index, row in forecasts_p50_df.iterrows():
clean_timestamp = dateutil.parser.parse(row['Timestamp'])
results_df = results_df.append({'timestamp' : clean_timestamp , 'value' : row['Value'], 'source': 'p50'} , ignore_index=True)
for index, row in forecasts_p90_df.iterrows():
clean_timestamp = dateutil.parser.parse(row['Timestamp'])
results_df = results_df.append({'timestamp' : clean_timestamp , 'value' : row['Value'], 'source': 'p90'} , ignore_index=True)
pivot_df = results_df.pivot(columns='source', values='value', index="timestamp")
pivot_df.plot(figsize=(15, 7))
I'm getting this error:
AttributeError: 'DataFrame' object has no attribute 'append'
I'm new to this so can someone please help me fix this problem?
I tried running the code but it wasn't working and an error was popping up, I don't know how to fix it.