diff --git a/forecasting_prophet/prophet_forecaster.py b/forecasting_prophet/prophet_forecaster.py index 9a8bff387e5ee654aef24ada111e7aa48ab426cf..5520e58601bc137cfb7ab3286013a37207116f51 100644 --- a/forecasting_prophet/prophet_forecaster.py +++ b/forecasting_prophet/prophet_forecaster.py @@ -65,12 +65,12 @@ def train(metric): for j in range(i + 1, (len(dataset[metric]) - 1)): if (dataset[metric][j] == "None" and dataset[metric][j + 1] != "None" and dataset[metric][j - 1] != "None"): myds.append(dataset['ems_time'][j]) - myy.append((dataset[metric][j - 1] + dataset[metric][j + 1]) / 2) + myy.append((float(dataset[metric][j - 1]) + (float(dataset[metric][j + 1]) )/ 2)) elif(dataset[metric][j] == "None" and (dataset[metric][j + 1] == "None" or dataset[metric][j - 1] == "None")): j = j + 1 elif(dataset[metric][j] != "None"): myds.append(dataset['ems_time'][j]) - myy.append(dataset[metric][j]) + myy.append(float(dataset[metric][j])) j = j + 1 if (dataset[metric][len(dataset[metric]) - 1] != "None"):