replacing the deprecated append method with the concat method in pandas
This commit is contained in:
parent
ccc0196f56
commit
eac7a83265
@ -146,7 +146,7 @@ class ClusteredMVFTS(mvfts.MVFTS):
|
||||
|
||||
new_data_point[self.target_variable.data_label] = tmp.expected_value()
|
||||
|
||||
sample = sample.append(new_data_point, ignore_index=True)
|
||||
sample = pd.concat([sample, 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 = ret.append(tmp, ignore_index=True)
|
||||
ret = pd.concat([ret, tmp], ignore_index=True)
|
||||
|
||||
return ret
|
||||
|
||||
|
@ -211,7 +211,7 @@ class MVFTS(fts.FTS):
|
||||
|
||||
new_data_point[self.target_variable.data_label] = tmp
|
||||
|
||||
ndata = ndata.append(new_data_point, ignore_index=True)
|
||||
ndata = pd.concat([ndata, 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 = lo.append(new_data_point_lo, ignore_index=True)
|
||||
up = up.append(new_data_point_up, ignore_index=True)
|
||||
lo = pd.concat([lo, new_data_point_lo], ignore_index=True)
|
||||
up = pd.concat([up, new_data_point_up], ignore_index=True)
|
||||
|
||||
return ret[-steps:]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user