Skip to content

Commit

Permalink
Prepare for pandas 2.0 by casting datetime to timestamp.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 576154444
  • Loading branch information
ColCarroll authored and tensorflower-gardener committed Oct 24, 2023
1 parent abdc777 commit 346cb6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tensorflow_probability/python/sts/holiday_effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def get_default_holidays(times, country):
columns=['geo', 'holiday', 'date'])
holidays = holidays.explode('holiday')
# Ensure that only holiday dates covered by times are used.
holidays = holidays[(holidays['date'] >= times.min())
& (holidays['date'] <= times.max())]
holidays = holidays[(pd.to_datetime(holidays['date']) >= times.min())
& (pd.to_datetime(holidays['date']) <= times.max())]
holidays = holidays.reset_index(drop=True)
holidays['date'] = pd.to_datetime(holidays['date'])
holidays = holidays.sort_values('date')
Expand Down

0 comments on commit 346cb6f

Please sign in to comment.