id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 1119647191,I_kwDOAMm_X85CvHXX,6220,[FEATURE]: Use fast path when grouping by unique monotonic decreasing variable,2448579,open,0,,,1,2022-01-31T16:24:29Z,2023-01-09T16:48:58Z,,MEMBER,,,,"### Is your feature request related to a problem? See https://github.com/pydata/xarray/pull/6213/files#r795716713 We check whether the `by` variable for groupby is unique and monotonically increasing. But the fast path would also apply to unique and monotonically decreasing variables. ### Describe the solution you'd like Update the condition to `is_monotonic_increasing or is_monotonic_decreasing` and add a test. ### Describe alternatives you've considered _No response_ ### Additional context _No response_","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6220/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue