Pragya Jatav commited on
Commit
2011d46
·
1 Parent(s): 6ef309a
Streamlit_functions.py CHANGED
@@ -1506,7 +1506,7 @@ def scenario_spend_forecasting(delta_df,start_date,end_date):
1506
  key_df["Channel_name"] = ["Email","DisplayRetargeting","\xa0Video","BroadcastTV","SocialRetargeting","Connected&OTTTV","SearchBrand","Audio","SocialProspecting","CableTV","DisplayProspecting","SearchNon-brand","DigitalPartners"]
1507
  key_df["Channels"] = ["EMAIL","DISPLAY RETARGETING","VIDEO","BROADCAST TV","SOCIAL RETARGETING","CONNECTED & OTT TV","SEARCH BRAND","AUDIO","SOCIAL PROSPECTING","CABLE TV","DISPLAY PROSPECTING","SEARCH NON-BRAND","DIGITAL PARTNERS"]
1508
  delta_df = delta_df.merge(key_df,on = "Channel_name",how = "inner")
1509
- print(delta_df)
1510
 
1511
  data3 = data2.copy()
1512
  for channel in delta_df["Channels"]:
@@ -1514,8 +1514,8 @@ def scenario_spend_forecasting(delta_df,start_date,end_date):
1514
  delta_percent = delta_df[delta_df["Channels"]==channel]["Delta_percent"].iloc[0]
1515
  print(delta_percent)
1516
  data3[channel] = data3[channel]*(1+delta_percent/100)
1517
- print(data2)
1518
- print(data3)
1519
 
1520
 
1521
  ###### output dataframes
@@ -1523,7 +1523,7 @@ def scenario_spend_forecasting(delta_df,start_date,end_date):
1523
 
1524
  #### percent change dataframe
1525
  delta_df2 = pd.DataFrame(data = delta_df["Delta_percent"].values,index = delta_df["Channels"])
1526
- print(delta_df2)
1527
  output_df1 = (pd.DataFrame(data2.sum()).transpose()).append(pd.DataFrame(data3.sum()).transpose()).append(delta_df2.transpose())
1528
  output_df1.index = ["Last Year Spends", "Forecasted Spends","Spends Change"]
1529
 
 
1506
  key_df["Channel_name"] = ["Email","DisplayRetargeting","\xa0Video","BroadcastTV","SocialRetargeting","Connected&OTTTV","SearchBrand","Audio","SocialProspecting","CableTV","DisplayProspecting","SearchNon-brand","DigitalPartners"]
1507
  key_df["Channels"] = ["EMAIL","DISPLAY RETARGETING","VIDEO","BROADCAST TV","SOCIAL RETARGETING","CONNECTED & OTT TV","SEARCH BRAND","AUDIO","SOCIAL PROSPECTING","CABLE TV","DISPLAY PROSPECTING","SEARCH NON-BRAND","DIGITAL PARTNERS"]
1508
  delta_df = delta_df.merge(key_df,on = "Channel_name",how = "inner")
1509
+ # print(delta_df)
1510
 
1511
  data3 = data2.copy()
1512
  for channel in delta_df["Channels"]:
 
1514
  delta_percent = delta_df[delta_df["Channels"]==channel]["Delta_percent"].iloc[0]
1515
  print(delta_percent)
1516
  data3[channel] = data3[channel]*(1+delta_percent/100)
1517
+ # print(data2)
1518
+ # print(data3)
1519
 
1520
 
1521
  ###### output dataframes
 
1523
 
1524
  #### percent change dataframe
1525
  delta_df2 = pd.DataFrame(data = delta_df["Delta_percent"].values,index = delta_df["Channels"])
1526
+ # print(delta_df2)
1527
  output_df1 = (pd.DataFrame(data2.sum()).transpose()).append(pd.DataFrame(data3.sum()).transpose()).append(delta_df2.transpose())
1528
  output_df1.index = ["Last Year Spends", "Forecasted Spends","Spends Change"]
1529
 
__pycache__/Streamlit_functions.cpython-310.pyc CHANGED
Binary files a/__pycache__/Streamlit_functions.cpython-310.pyc and b/__pycache__/Streamlit_functions.cpython-310.pyc differ
 
summary_df.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:89f9c3faa933ceebd7bee0c47ec71d04b7b8bdf401cd2ad55f0e22604203216f
3
  size 1822
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:565880993257a724d2f0f01de4f1ec3ee06059691b68b17bea993a06087080ce
3
  size 1822