Commit 2794e102 authored by wenwen.tang's avatar wenwen.tang 😕

bugfix

parent f502aea2
......@@ -146,11 +146,9 @@ class TrainingDataBuilder(ABC):
for col in ['NAPMPMI']:
DataAll[col].bfill(inplace=True)
DataAll[col].ffill(inplace=True)
###### clean NaN
DataAll.ffill(inplace=True)
DataAll.dropna(inplace=True)
DataAll.reset_index(inplace=True, drop=True)
for col in DataAll.columns:
if col not in ['CPI_YOY', 'CPURNSA', 'CPI_MOM', 'CPI_MOM_Diff', 'futureR', 'yLabel']:
DataAll[col].ffill(inplace=True)
if (self._toForecast):
# 处理CPI_YOY:美国城镇消费物价指数同比未经季 CPURNSA:美国消费者物价指数未经季调
......@@ -166,6 +164,10 @@ class TrainingDataBuilder(ABC):
X_forecast = forecastData.to_numpy()
del DataAllCopy
###### clean NaN
DataAll.dropna(inplace=True)
DataAll.reset_index(inplace=True, drop=True)
###### get X and y
y = DataAll['yLabel'].to_numpy(copy=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment