Repository navigation
BUG: make resample with Day freq consistent with equivalent Hour freq - #64793
Merged
Merged
Conversation
jbrockmendel
force-pushed
the
big-resample-168
branch
from
March 24, 2026 23:07
d60e2f4 to
c3e0de6
Compare
jbrockmendel
force-pushed
the
big-resample-168
branch
3 times, most recently
from
April 4, 2026 02:12
9c7c558 to
093c218
Compare
4 tasks done
jbrockmendel
force-pushed
the
big-resample-168
branch
from
April 6, 2026 22:09
50655ad to
de16051
Compare
…pandas-dev#44996) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
jbrockmendel
force-pushed
the
big-resample-168
branch
from
April 7, 2026 16:47
de16051 to
9d1abbb
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The warning gate previously read obj.index.tz in TimeGrouper.__init__, which is wrong when obj is None (pd.Grouper, groupby().resample()), when resampling on a column, and for PeriodIndex/TimedeltaIndex. Move the Day check to _get_resampler where the binning axis is resolved. Also remove an unreachable re-localize block, skip the offset warning on TimedeltaIndex where offset does take effect, and update the stale resample docstring note (GH#44996). Co-Authored-By: Claude Fable 5 <[email protected]>
# Conflicts: # doc/source/whatsnew/v3.1.0.rst # pandas/tests/resample/test_datetime_index.py
GH#43198 and GH#43896 regression tests asserted the old Day bin layout; with tz-naive Day now matching the equivalent Hour freq, update their expected bins accordingly. Co-Authored-By: Claude Opus 4.8 <[email protected]>
jbrockmendel
marked this pull request as ready for review
July 17, 2026 22:06
Sharl0tteIsTaken
added a commit
to Sharl0tteIsTaken/pandas
that referenced
this pull request
Jul 19, 2026
…-comparison * upstream/main: (242 commits) PERF: vectorize to_datetime(DataFrame) field assembly (pandas-dev#65195) BUG: make resample with Day freq consistent with equivalent Hour freq (pandas-dev#64793) PERF: avoid redundant Index.equals calls in pd.concat (pandas-dev#66355) BUG: Fix TimedeltaIndex string slice resolution (pandas-dev#64870) BUG: rolling cov/corr NaN poisoning after empty window (GH#65739) (pandas-dev#66243) PERF: speed up nanops pearson correlation (pandas-dev#65502) BUG: PeriodIndex resample to a finer frequency bypassed aggregation (pandas-dev#65096) PERF: serialize tz-aware datetime to_json from datetime64 ndarray (pandas-dev#66007) PERF: faster to_datetime parsing of timezone-aware strings (pandas-dev#66123) BUG: read_csv parallel path silently corrupts data under low_memory=False (GH#64347) (pandas-dev#66327) BUG: Fix to_period losing month anchor for start/business offsets (pandas-dev#64954) BUG: DataFrame.agg with list of funcs mishandles non-reduction methods (GH#65031) (pandas-dev#66173) BUG: nullable/arrow EA setitem silently storing out-of-range values (GH#47776) (pandas-dev#66321) DEPR: to_datetime with integer/float values and format argument (pandas-dev#65181) BUG: setitem-with-expansion casting regressions from GH#62523 (pandas-dev#66251) BUG: SparseArray.astype to int silently dropped NaT fill via Series.astype (GH#49631) (pandas-dev#66175) BUG: loc/iloc split-path 2D setitem with a list of 1-D arrays silently transposed (GH#64230) (pandas-dev#66244) BUG: unstack CoW-aliasing untracked for tz-aware/period columns (GH#65748) (pandas-dev#66163) BUG: groupby quantile with non-null NaN and all-NaT groups (GH#64330) (pandas-dev#66183) BUG: tz_localize/tz_convert wrong for non-nanosecond resolution before 1677 (pandas-dev#66252) ...
2 tasks done
spencerkclark
added a commit
to pydata/xarray
that referenced
this pull request
Aug 30, 2026
### Description Pandas is rolling back a change we adapted to about a year ago (#10650) related to resampling with a `Day` frequency (pandas-dev/pandas#64793). This PR makes the necessary changes in xarray to do the same. This addresses some of the upstream failures surfaced in #11501. ### Checklist - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` ### AI Disclosure This PR was created without AI.
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #44996
closes #62200
On a timezone-naive index, resampling with a
Dayfrequency (e.g."7D") now produces the same bins as the equivalentHourfrequency ("168h"):originandoffsettake effect instead of being silently ignored, andclosed="right"no longer produces an extra trailing bin (GH-62200).Timezone-aware indexes are intentionally unchanged: a calendar
Dayis not always 24 hours across DST transitions, so they keep calendar-day semantics and the existingRuntimeWarningthatorigin/offsetdo not take effect. (GH-44996 also reports the discrepancy for tz-aware indexes; that part is out of scope here.) The warning is now determined from the actual binning axis, so it fires correctly forpd.Grouper,on=, andgroupby().resample()as well, and is no longer raised foroffseton aTimedeltaIndex, whereoffsetdoes take effect.🤖 Generated with Claude Code