Skip to content

Commit 346cb6f

Browse files
ColCarrolltensorflower-gardener
authored andcommitted
Prepare for pandas 2.0 by casting datetime to timestamp.
PiperOrigin-RevId: 576154444
1 parent abdc777 commit 346cb6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow_probability/python/sts/holiday_effects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def get_default_holidays(times, country):
5252
columns=['geo', 'holiday', 'date'])
5353
holidays = holidays.explode('holiday')
5454
# Ensure that only holiday dates covered by times are used.
55-
holidays = holidays[(holidays['date'] >= times.min())
56-
& (holidays['date'] <= times.max())]
55+
holidays = holidays[(pd.to_datetime(holidays['date']) >= times.min())
56+
& (pd.to_datetime(holidays['date']) <= times.max())]
5757
holidays = holidays.reset_index(drop=True)
5858
holidays['date'] = pd.to_datetime(holidays['date'])
5959
holidays = holidays.sort_values('date')

0 commit comments

Comments
 (0)