html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/324#issuecomment-1054569287,https://api.github.com/repos/pydata/xarray/issues/324,1054569287,IC_kwDOAMm_X84-23NH,2448579,2022-02-28T19:03:17Z,2022-02-28T19:03:17Z,MEMBER,"I have this almost ready in [flox](https://github.com/dcherian/flox/pull/76/) (needs more tests). So we should be able to do this soon.
In the mean time note that we can view grouping over multiple variables as a ""factorization"" (group identification) problem for aggregations. That means you can
1. use `pd.factorize`, `pd.cut`, `np.searchsorted` or `np.bincount` to convert each `by` variable to an integer code,
2. then use `np.ravel_multi_index` to combine the codes to a single variable `idx`
3. Group by `idx` and accumulate
4. use `np.unravel_index` (or just a simple `np.reshape`) to convert the single grouped dimension to a multiple dimensions.
5. Construct output coordinate arrays.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,58117200