issue_comments
2 rows where author_association = "MEMBER", issue = 536900797 and user = 14808389 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- Autocomplete in registered accessors · 2 ✖
| id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 565718679 | https://github.com/pydata/xarray/issues/3614#issuecomment-565718679 | https://api.github.com/repos/pydata/xarray/issues/3614 | MDEyOklzc3VlQ29tbWVudDU2NTcxODY3OQ== | keewis 14808389 | 2019-12-14T13:45:38Z | 2019-12-14T13:54:30Z | MEMBER | that works for me, too. I moved the accessor code into a file, then imported it: ```python In [1]: import xarray as xr ...: import numpy as np ...: import custom_accessor In [2]: ds = xr.Dataset( ...: {"a": (("latitude", "longitude"), np.linspace(0, 1, 5 * 10).reshape(5, 10))}, ...: coords={"latitude": np.arange(5), "longitude": np.arange(10)}, ...: ) In [3]: # ds.geo.c<TAB>
...: ds.geo.center
Out[3]: (2.0, 4.5)
Edit: does your accessor work, i.e. does |
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
Autocomplete in registered accessors 536900797 | |
| 565476562 | https://github.com/pydata/xarray/issues/3614#issuecomment-565476562 | https://api.github.com/repos/pydata/xarray/issues/3614 | MDEyOklzc3VlQ29tbWVudDU2NTQ3NjU2Mg== | keewis 14808389 | 2019-12-13T15:11:57Z | 2019-12-14T00:14:55Z | MEMBER | This already works for me in a IPython shell ( In [2]: @xr.register_dataset_accessor("geo") ...: class GeoAccessor: ...: def init(self, xarray_obj): ...: self._obj = xarray_obj ...: ...: @property ...: def center(self): ...: # return the geographic center point of this dataset ...: lon = self._obj.latitude ...: lat = self._obj.longitude ...: return (float(lon.mean()), float(lat.mean())) ...: ...: def plot(self): ...: # plot this array's data on a map, e.g., using Cartopy ...: pass ...: In [3]: ds = xr.Dataset( ...: {"a": (("latitude", "longitude"), np.linspace(0, 1, 5 * 10).reshape(5, 10))}, ...: coords={"latitude": np.arange(5), "longitude": np.arange(10)}, ...: ) In [4]: # ds.geo.c<TAB>: ...: ds.geo.center Out[4]: (2.0, 4.5) ``` Am I missing something? Edit: what does not work is something like ```python In [5]: ds = xr.Dataset( ...: {"a": (("latitude", "longitude"), np.linspace(0, 1, 5 * 10).reshape(5, 10))}, ...: coords={ ...: "latitude": np.arange(5), ...: "longitude": np.arange(10), ...: "time": np.datetime64("1999-01-01"), ...: }, ...: ) In [6]: # ds.time.dt.y<TAB> ...: ds.time.dt.y In [7]: time = ds.time
...: # time.dt.y<TAB>
...: time.dt.year
|
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
Autocomplete in registered accessors 536900797 |
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