Fix bug of select_days_to_analyse.py

pull/95/head
Meng Li 2020-03-31 14:51:08 -04:00
parent 679ec1935d
commit ac9fb487a6
1 changed files with 3 additions and 0 deletions

View File

@ -1,8 +1,11 @@
import numpy as np
import pandas as pd
from datetime import timedelta
def appendDaysInRange(days_to_analyse, start_date, end_date):
num_of_days = (end_date - start_date).days
if np.isnan(num_of_days):
return days_to_analyse
for day in range(num_of_days + 1):
days_to_analyse = days_to_analyse.append({"local_date": start_date + timedelta(days = day)}, ignore_index=True)
return days_to_analyse