We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3c2270 commit ce01eebCopy full SHA for ce01eeb
server/chalicelib/aggregation.py
@@ -11,6 +11,8 @@
11
def train_peak_status(df):
12
cal = USFederalHolidayCalendar()
13
holidays = cal.holidays(start=df['dep_dt'].min(), end=df['dep_dt'].max())
14
+ # pandas has a bug where sometimes empty holidays returns an Index and we need DateTimeIndex
15
+ holidays = pd.to_datetime(holidays)
16
df['holiday'] = df['service_date'].isin(holidays.date)
17
18
# Peak Hours: non-holiday weekdays 6:30-9am; 3:30-6:30pm
0 commit comments