From e064adc29e76784b7b6cd42964acc77721731461 Mon Sep 17 00:00:00 2001 From: Pilar Date: Tue, 8 Jun 2021 12:58:57 -0400 Subject: [PATCH] bug fixed in monthly_values.py --- helpers/monthly_values.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helpers/monthly_values.py b/helpers/monthly_values.py index cf18689..2dfa80d 100644 --- a/helpers/monthly_values.py +++ b/helpers/monthly_values.py @@ -6,7 +6,7 @@ Copyright © 2020 Project Author Pilar Monsalvete pilar_monsalvete@yahoo.es import pandas as pd import numpy as np -import helpers.constants as cte +import calendar as cal class MonthlyValues: @@ -40,7 +40,8 @@ class MonthlyValues: """ array = [] for i in range(0, 12): - total_hours = cte.days_of_month[i] * 24 + days_of_month = cal.monthrange(2015, i+1)[1] + total_hours = days_of_month * 24 array = np.concatenate((array, np.full(total_hours, i + 1))) self._month_hour = pd.DataFrame(array, columns=['month']) return self._month_hour