Spaces:
Runtime error
Runtime error
Update pages/1_Store Demand Forecasting.py
Browse files
pages/1_Store Demand Forecasting.py
CHANGED
@@ -266,6 +266,7 @@ if option=='TFT':
|
|
266 |
train_a=train_dataset.loc[(train_dataset['store']==store) & (train_dataset['item']==item)][['date','store','item','sales']]
|
267 |
test_a=test_dataset.loc[(test_dataset['store']==store) & (test_dataset['item']==item)][['date','store','item','sales']]
|
268 |
actual_final_data=pd.concat([train_a,test_a])
|
|
|
269 |
tab3.dataframe(actual_final_data,width=500)
|
270 |
|
271 |
except:
|
@@ -476,15 +477,16 @@ elif option=='Prophet':
|
|
476 |
)
|
477 |
|
478 |
#------------------------------------------Tab-3--------------------------------------------------
|
479 |
-
train_a=fb_train_data.loc[fb_train_data[item]==1][['
|
480 |
train_a['store']=1
|
481 |
train_a['item']=item
|
482 |
train_a.rename({'y':'sales'})
|
483 |
-
test_a=fb_test_data.loc[fb_test_data[item]==1][['
|
484 |
test_a['store']=1
|
485 |
test_a['item']=item
|
486 |
-
test_a.rename({'y':'sales'})
|
487 |
actual_final_data=pd.concat([train_a,test_a])
|
|
|
488 |
tab3.dataframe(actual_final_data,width=500)
|
489 |
|
490 |
|
|
|
266 |
train_a=train_dataset.loc[(train_dataset['store']==store) & (train_dataset['item']==item)][['date','store','item','sales']]
|
267 |
test_a=test_dataset.loc[(test_dataset['store']==store) & (test_dataset['item']==item)][['date','store','item','sales']]
|
268 |
actual_final_data=pd.concat([train_a,test_a])
|
269 |
+
actual_final_data['date']=actual_final_data['date'].dt.date
|
270 |
tab3.dataframe(actual_final_data,width=500)
|
271 |
|
272 |
except:
|
|
|
477 |
)
|
478 |
|
479 |
#------------------------------------------Tab-3--------------------------------------------------
|
480 |
+
train_a=fb_train_data.loc[fb_train_data[item]==1][['ds','y']]
|
481 |
train_a['store']=1
|
482 |
train_a['item']=item
|
483 |
train_a.rename({'y':'sales'})
|
484 |
+
test_a=fb_test_data.loc[fb_test_data[item]==1][['ds','y']]
|
485 |
test_a['store']=1
|
486 |
test_a['item']=item
|
487 |
+
test_a.rename({'y':'sales',"ds":'date'})
|
488 |
actual_final_data=pd.concat([train_a,test_a])
|
489 |
+
actual_final_data['ds']=actual_final_data['ds'].dt.date
|
490 |
tab3.dataframe(actual_final_data,width=500)
|
491 |
|
492 |
|