replacing the deprecated append method with the concat method in pandas

This commit is contained in:
Антон Скалкин 2024-08-14 11:57:24 +04:00
parent ccc0196f56
commit eac7a83265
2 changed files with 5 additions and 5 deletions

View File

@ -146,7 +146,7 @@ class ClusteredMVFTS(mvfts.MVFTS):
new_data_point[self.target_variable.data_label] = tmp.expected_value() 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:] return ret[-steps:]
@ -199,7 +199,7 @@ class ClusteredMVFTS(mvfts.MVFTS):
for k in np.arange(0, steps): for k in np.arange(0, steps):
sample = ret.iloc[k:self.order+k] sample = ret.iloc[k:self.order+k]
tmp = self.forecast_multivariate(sample, **kwargs) tmp = self.forecast_multivariate(sample, **kwargs)
ret = ret.append(tmp, ignore_index=True) ret = pd.concat([ret, tmp], ignore_index=True)
return ret return ret

View File

@ -211,7 +211,7 @@ class MVFTS(fts.FTS):
new_data_point[self.target_variable.data_label] = tmp 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:] 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_lo[self.target_variable.data_label] = min(tmp_lo)
new_data_point_up[self.target_variable.data_label] = max(tmp_up) new_data_point_up[self.target_variable.data_label] = max(tmp_up)
lo = lo.append(new_data_point_lo, ignore_index=True) lo = pd.concat([lo, new_data_point_lo], ignore_index=True)
up = up.append(new_data_point_up, ignore_index=True) up = pd.concat([up, new_data_point_up], ignore_index=True)
return ret[-steps:] return ret[-steps:]