Skip to content

xarray.DataArray Resampling #5079

Answered by keewis
epifanio asked this question in Q&A
Mar 26, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

the issue is that your time variable is not sorted. You can fix that using argsort sortby:

rawdata = rawdata.sortby("time")

I'm not sure why pandas works for unsorted indexes. Maybe they automatically sort the indexes before resampling?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@keewis
Comment options

Answer selected by epifanio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants