Skip to content

BUG: make resample with Day freq consistent with equivalent Hour freq#64793

Draft
jbrockmendel wants to merge 1 commit intopandas-dev:mainfrom
jbrockmendel:big-resample-168
Draft

BUG: make resample with Day freq consistent with equivalent Hour freq#64793
jbrockmendel wants to merge 1 commit intopandas-dev:mainfrom
jbrockmendel:big-resample-168

Conversation

@jbrockmendel
Copy link
Member

Summary

  • Fixes an inconsistency where resample("7D") produced different bin edges than resample("168h"), even though 7 days = 168 hours (GH#44996)
  • Day freq now goes through _adjust_dates_anchored (same path as Tick offsets), with tz-stripping to handle DST correctly
  • origin and offset parameters are now respected for Day frequencies instead of being silently ignored

Test plan

  • Existing resample tests pass (4106 passed)
  • New parametrized tests verify 7D matches 168h across closed/label combinations
  • New parametrized test verifies origin works with Day freq across tz={None, UTC, US/Eastern}
  • DST edge cases tested (nonexistent times, fall-back transitions)

Closes #44996

🤖 Generated with Claude Code

…pandas-dev#44996) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 participant