Exception when resampling ends on a DST change date #8653
Labels
Bug
Duplicate Report
Duplicate issue or pull request
Resample
resample method
Timezones
Timezone data dtype
Milestone
Hi all, I'm experiencing an exception when calling
resample('D', how='mean')
on a Series or Dataframe whose index (datetime-based) ends just on a DST change date.As a workaround, I'm currently try/except-ing the ValueError and eventually adding a np.nan datapoint at the end of the series (effectively "walking over" the DST change date). At that point I call
resample
which completes correctly and filters away the np.nan datapoint anyway.Snippet [1] reproduces the bug, calling
resample
on a short series which ends on Oct 26th, which was the DST change date for Europe/Rome. Raised exception is [2]. If relevant, [3] shows the installed versions info.[1]
[2]
The text was updated successfully, but these errors were encountered: