Update app.py
Browse files
app.py
CHANGED
@@ -63,9 +63,10 @@ if forecast is not None:
|
|
63 |
st.write(f"Trend: {trend}, Damped Trend: {damped_trend}, Seasonal: {seasonal}, Seasonal Period: {seasonal_period}")
|
64 |
forecast_index = pd.date_range(start=city_data.index[-1], periods=7, freq='M')[1:]
|
65 |
forecast_index = forecast_index.to_period('M') # Convert to period index with monthly frequency
|
66 |
-
forecast_df = pd.DataFrame(forecast, index=forecast_index, columns=['Forecast'])
|
|
|
67 |
# Ensure the index is correctly formatted as 'YYYY-MM'
|
68 |
-
forecast_df.index = forecast_df.index.strftime('%Y-%m')
|
69 |
st.table(forecast_df)
|
70 |
st.line_chart(forecast_df)
|
71 |
# ... [rest of the code]
|
|
|
63 |
st.write(f"Trend: {trend}, Damped Trend: {damped_trend}, Seasonal: {seasonal}, Seasonal Period: {seasonal_period}")
|
64 |
forecast_index = pd.date_range(start=city_data.index[-1], periods=7, freq='M')[1:]
|
65 |
forecast_index = forecast_index.to_period('M') # Convert to period index with monthly frequency
|
66 |
+
# forecast_df = pd.DataFrame(forecast, index=forecast_index, columns=['Forecast'])
|
67 |
+
forecast_df = pd.DataFrame(forecast,columns=['Forecast'])
|
68 |
# Ensure the index is correctly formatted as 'YYYY-MM'
|
69 |
+
# forecast_df.index = forecast_df.index.strftime('%Y-%m')
|
70 |
st.table(forecast_df)
|
71 |
st.line_chart(forecast_df)
|
72 |
# ... [rest of the code]
|