AmbiguousTimeError exception when resampling near DST change date (original) (raw)

index = pd.to_datetime(pd.Series([ '2014-10-26 07:35:49', '2014-10-26 07:45:08', '2014-10-26 08:04:58' ]))

df = pd.DataFrame(np.arange(len(index)), index=index) df = df.tz_localize('Asia/Krasnoyarsk', ambiguous='NaT') df.resample('D')

AmbiguousTimeError: Cannot infer dst time from Timestamp('2014-10-26 01:00:00'), try using the 'ambiguous' argument

UTC offset changed from +8 to +7 at 2:00 local time.