Skip to content

Commit

Permalink
Merge pull request #79 from CIAT-DAPA/develop
Browse files Browse the repository at this point in the history
add function to sum year
  • Loading branch information
santiago123x authored Oct 17, 2023
2 parents edd150d + 164331a commit 817af5a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/aclimate_resampling/resampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])

#

Expand Down

0 comments on commit 817af5a

Please sign in to comment.