replacing the deprecated append method with the concat method in pandas
This commit is contained in:
parent
eac7a83265
commit
4b348ad818
@ -146,7 +146,7 @@ class ClusteredMVFTS(mvfts.MVFTS):
|
||||
|
||||
new_data_point[self.target_variable.data_label] = tmp.expected_value()
|
||||
|
||||
sample = pd.concat([sample, new_data_point], ignore_index=True)
|
||||
sample = pd.concat([sample, pd.DataFrame([new_data_point])], ignore_index=True)
|
||||
|
||||
return ret[-steps:]
|
||||
|
||||
@ -199,7 +199,7 @@ class ClusteredMVFTS(mvfts.MVFTS):
|
||||
for k in np.arange(0, steps):
|
||||
sample = ret.iloc[k:self.order+k]
|
||||
tmp = self.forecast_multivariate(sample, **kwargs)
|
||||
ret = pd.concat([ret, tmp], ignore_index=True)
|
||||
ret = pd.concat([ret, pd.DataFrame([tmp])], ignore_index=True)
|
||||
|
||||
return ret
|
||||
|
||||
|
@ -211,7 +211,7 @@ class MVFTS(fts.FTS):
|
||||
|
||||
new_data_point[self.target_variable.data_label] = tmp
|
||||
|
||||
ndata = pd.concat([ndata, new_data_point], ignore_index=True)
|
||||
ndata = pd.concat([ndata, pd.DataFrame([new_data_point])], ignore_index=True)
|
||||
|
||||
return ret[-steps:]
|
||||
|
||||
@ -307,8 +307,8 @@ class MVFTS(fts.FTS):
|
||||
new_data_point_lo[self.target_variable.data_label] = min(tmp_lo)
|
||||
new_data_point_up[self.target_variable.data_label] = max(tmp_up)
|
||||
|
||||
lo = pd.concat([lo, new_data_point_lo], ignore_index=True)
|
||||
up = pd.concat([up, new_data_point_up], ignore_index=True)
|
||||
lo = pd.concat([lo, pd.DataFrame([new_data_point_lo])], ignore_index=True)
|
||||
up = pd.concat([up, pd.DataFrame([new_data_point_up])], ignore_index=True)
|
||||
|
||||
return ret[-steps:]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user