Replace functools.reduce() with pd.concat() to concat dataframes in cross_validation

This commit is contained in:
Kishan Manani 2019-06-28 11:14:26 +01:00 committed by Ben Letham
parent e8ddded4fe
commit df8e39ae15

View file

@ -136,7 +136,7 @@ def cross_validation(model, horizon, period=None, initial=None):
], axis=1))
# Combine all predicted pd.DataFrame into one pd.DataFrame
return reduce(lambda x, y: x.append(y), predicts).reset_index(drop=True)
return pd.concat(predicts, axis=0).reset_index(drop=True)
def prophet_copy(m, cutoff=None):
"""Copy Prophet object