stinoco commited on
Commit
8566ffe
·
1 Parent(s): 1264840

changed labels

Browse files
Files changed (1) hide show
  1. get_forecast.py +3 -3
get_forecast.py CHANGED
@@ -48,11 +48,11 @@ def get_forecast(serie: str, periods, percent_change: int):
48
  aux_0 = pd.concat([last_obs, values_0])
49
 
50
  # arrange dataframe
51
- df_future = future_values.rename(columns = {'ds': 'Date', 'yhat': serie}).copy()
52
  df_future['Date'] = df_future['Date'].apply(lambda x: x.date())
53
  df_future[f'{serie} without price change'] = values_0.rename(columns = {'ds': 'Date', 'yhat': serie})[serie]
54
- df_future['Diff'] = df_future[serie] - df_future[f'{serie} without price change']
55
- df_future[serie] = df_future[serie].apply(lambda x: round(x, 4))
56
  df_future[f'{serie} without price change'] = df_future[f'{serie} without price change'].apply(lambda x: round(x, 4))
57
  df_future['Diff'] = df_future['Diff'].apply(lambda x: round(x, 4))
58
 
 
48
  aux_0 = pd.concat([last_obs, values_0])
49
 
50
  # arrange dataframe
51
+ df_future = future_values.rename(columns = {'ds': 'Date', 'yhat': f'{serie} with price change'}).copy()
52
  df_future['Date'] = df_future['Date'].apply(lambda x: x.date())
53
  df_future[f'{serie} without price change'] = values_0.rename(columns = {'ds': 'Date', 'yhat': serie})[serie]
54
+ df_future['Diff'] = df_future[f'{serie} with price change'] - df_future[f'{serie} without price change']
55
+ df_future[f'{serie} with price change'] = df_future[f'{serie} with price change'].apply(lambda x: round(x, 4))
56
  df_future[f'{serie} without price change'] = df_future[f'{serie} without price change'].apply(lambda x: round(x, 4))
57
  df_future['Diff'] = df_future['Diff'].apply(lambda x: round(x, 4))
58