I'm currently trying to append the values from my DataFrame forecast_array to the DataFrame df_temp. I don't get any error messages, but when I try to print out the df_temp, it is empty...
My code:
import pandas as pd
...
def forecast(forecast_array):
df_temp = pd.DataFrame(columns=['Article Nr', 'Brand','Date', 'Sales base line', 'Sales upper boundaries', 'Sales lower boundaries', 'Simple Prediction of order date', 'Order Value', 'Note'])
df_temp.append(forecast_array.iloc[0], ignore_index= True)
print(df_temp)
return df_temp
The forecast_array DataFrame has the following structure:
Date Sales base line ... open Orders Reservations
2022-09-30 01.10.2022 979.997823 ... 0 0
Just as information: in the ... are the same columns as in the df_temp DataFrame, the only two columns, which aren't in the forecast_array are ArticleNr and Brand.
I have also tried to append the data without the .iloc[0], but it also doesn't work.
Thanks for your help!