From 04df729d9d92c08811ecd7f3f8b95e995f00b8f9 Mon Sep 17 00:00:00 2001 From: mariavictoriadiaz Date: Fri, 8 Sep 2023 07:55:18 -0500 Subject: [PATCH] change append method --- src/aclimate_resampling/resampling.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aclimate_resampling/resampling.py b/src/aclimate_resampling/resampling.py index 659854a..46f6023 100644 --- a/src/aclimate_resampling/resampling.py +++ b/src/aclimate_resampling/resampling.py @@ -259,7 +259,8 @@ def forecast_station(self,station, prob, daily_data_root, output_root, year_fore # If year of forecast is a leap year and a year in climate data is not, then add one day to february in climate data if leap_forecast == True and year.iloc[0] == False: - year_data.append(year_data.sample(1), ignore_index=True) + #year_data.append(year_data.sample(1), ignore_index=True) + year_data = pd.concat([year_data, year_data.sample(1)], ignore_index=True) year_data.iloc[-1,0] = 29 else: