issue_comments
1 row where author_association = "NONE", issue = 596606599 and user = 40410085 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- Sort DataArray by data values along one dim · 1 ✖
| id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 868260575 | https://github.com/pydata/xarray/issues/3957#issuecomment-868260575 | https://api.github.com/repos/pydata/xarray/issues/3957 | MDEyOklzc3VlQ29tbWVudDg2ODI2MDU3NQ== | jrbuzan 40410085 | 2021-06-25T06:33:47Z | 2021-06-25T07:45:20Z | NONE | Hello @zxdawn and @JavierRuano: I am new to python. And I've been working on a different approach to this issue of ranking data on 3D array. I believe I am close to a solution. I am able to generate ranks on a 3D array, but I can't figure out how to map those ranks to reorder the data from lowest to highest using the produced indexes. Perhaps you might know what needs to happen next? Cheers, -Jonathan code: import xarray as xr import os import numpy as np from xarray import DataArray from dask.distributed import Client c = Client() I am trying to produce a simpler version: coding: utf-8In[1]:import xarray as xr import os import numpy as np from xarray import DataArray In[2]:from dask.distributed import Client c = Client() In[19]:def calculate_rank(x): return x.rank(dim='time') In[4]:lat = 2 In[5]:lon = 3 In[6]:time = 5 In[7]:data = [[[ 29, 19, 8], [ 12, 7, 21]],
In[8]:data_xr = xr.DataArray(data, dims=['time', 'lat', 'lon'], coords={'time': np.arange(time)}) In[9]:data_xr.values Groupby on all of the dataIn[10]:stacked_object = data_xr.stack(gridcell=['lat','lon'])#.chunk({'gridcell':500}) In[11]:stacked_object.load() In[20]:TSA_Rank = stacked_object.groupby('gridcell').apply(calculate_rank).unstack() In[21]:TSA_Rank In[22]:TSA_Rank.values array([[[5., 3., 2.], [2., 1., 3.]],
In[23]:data_xr.values array([[[29, 19, 8], [12, 7, 21]], |
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
Sort DataArray by data values along one dim 596606599 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] (
[html_url] TEXT,
[issue_url] TEXT,
[id] INTEGER PRIMARY KEY,
[node_id] TEXT,
[user] INTEGER REFERENCES [users]([id]),
[created_at] TEXT,
[updated_at] TEXT,
[author_association] TEXT,
[body] TEXT,
[reactions] TEXT,
[performed_via_github_app] TEXT,
[issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
ON [issue_comments] ([user]);
user 1