-
Hello! This is from an earlier discussion and I am trying to regroup a monthly data set (time, lat, and lon) into year, month, lat, and lon: Some really helpful code was provided in one of the responses to do this (answered by @mathause):
air = xr.tutorial.open_dataset("air_temperature").resample(time="M").mean() ` However when I try calling the function I am getting an error that says:
which looks to be appearing at the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Without testing - can you try: ds = ds.assign_coords(year=("time", year.data), month=("time", month.data)) If this works I should also update my other answer - so I'd appreciate feedback. |
Beta Was this translation helpful? Give feedback.
Without testing - can you try:
If this works I should also update my other answer - so I'd appreciate feedback.