diff --git a/src/aclimate_resampling/resampling.py b/src/aclimate_resampling/resampling.py index 1b36be5..70f4a11 100644 --- a/src/aclimate_resampling/resampling.py +++ b/src/aclimate_resampling/resampling.py @@ -525,8 +525,15 @@ def save_forecast(self, station, output_root, year_forecast, seasons_range, base year_forecast = int(year_forecast) for i in range(len(IDs)): + # print(IDs[i]) + df = seasons_range[(seasons_range['id'] == IDs[i])] + + df = df.reset_index() + df = df.drop(columns = ['year']) + + for j in list(range(len(df))): - df.loc[j, 'year'] = self.add_year(year_forecast, df.loc[j, 'month']) + df.loc[j, 'year'] = self.add_year(year_forecast, df.loc[j, 'month']) #