Skip to content

Adapt to upstream change in resampling with a Day frequency - #11547

Open
spencerkclark wants to merge 1 commit into
pydata:mainfrom
spencerkclark:fix/cftime-resample-upstream-failure
Open

Adapt to upstream change in resampling with a Day frequency#11547
spencerkclark wants to merge 1 commit into
pydata:mainfrom
spencerkclark:fix/cftime-resample-upstream-failure

Conversation

@spencerkclark

Copy link
Copy Markdown
Member

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

  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst

AI Disclosure

This PR was created without AI.

@spencerkclark spencerkclark added the run-upstream Run upstream CI label Aug 29, 2026

def has_tick_resample_freq(freqs):
resample_freq, _ = freqs
_, resample_freq = freqs

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was previously inadvertently filtering on the initial_freq rather than the resample_freq...

By coincidence that happened to be OK given the set of frequency pairs that we were filtering and the pandas behavior at the time, but that is not the case anymore. This fixes that bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-upstream Run upstream CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants