79611126

Date: 2025-05-07 17:37:48
Score: 1.5
Natty:
Report link

On latest Xarray(>2024.04.0), you can do:

import xarray as xr
from xarray.groupers import SeasonResampler

ds = xr.tutorial.open_dataset("air_temperature")

ds.resample(time=SeasonResampler(["DJ"])).mean()

https://docs.xarray.dev/en/latest/user-guide/time-series.html#handling-seasons

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: dcherian