Open mlmaskey opened 3 years ago
@rheinheimer, @nickrsan, @asmtry, and @jviers, why the length of index
and vals
do not match? Even with unique()
operator, the length is not matched. I am not sure how to fix it. I realized that the logic seems to be weird even I succeeded to preporcess.
The issues in the
forecast_daily_to_monthly.py
fileLine 61:
# earliest_year = months_to_calculate[0][1]
butmonths_to_calculate
is not subscriptable so it needed to modify asLine 104:
# index = pd.to_datetime(['{}-{}-01'.format(ym[0].year, ym[1].month) for i in range(len(months_to_calculate))])
. Here, ym is not subscriptable so it was required to modify:index1 = pd.to_datetime(['{}-{}-01'.format(months_to_calculate[i].year, months_to_calculate[i].month) for i in range(len(months_to_calculate))])
Sindindex
orindex1
are in daily scales and that needs to be modified in monthly scale. So one has been done asindex = index1.unique()
in line 107 To match the length of vals index is spliced from 9 to -2 as in line 109df_final = pd.DataFrame(index=index[9:-2], data=vals, columns=month_columns)
It seems that we need to store in water year format so, it is redined as in new line 25 'month_columns=['10', '11', '12', '01', '02', '03', '04', '05', '06' , '07', '08', '09']'It needs careful revision and discusion thanks