tbdavid2019 commited on
Commit
1d22072
·
1 Parent(s): 843b7e5
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -26,12 +26,11 @@ def prepare_data_chronos(data):
26
  formatted_df = formatted_df.sort_values('timestamp')
27
 
28
  try:
29
- # 使用 from_data_frame 方法創建 TimeSeriesDataFrame
30
  ts_df = TimeSeriesDataFrame.from_data_frame(
31
  formatted_df,
32
  id_column='item_id',
33
- timestamp_column='timestamp',
34
- target_column='value'
35
  )
36
  return ts_df
37
  except Exception as e:
 
26
  formatted_df = formatted_df.sort_values('timestamp')
27
 
28
  try:
29
+ # 只使用必要的參數
30
  ts_df = TimeSeriesDataFrame.from_data_frame(
31
  formatted_df,
32
  id_column='item_id',
33
+ timestamp_column='timestamp'
 
34
  )
35
  return ts_df
36
  except Exception as e: