home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "NONE" and issue = 394625579 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 2

  • xylar 2
  • zxdawn 2

issue 1

  • open_mfdataset change the attributes of Coordinates · 4 ✖

author_association 1

  • NONE · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
450458650 https://github.com/pydata/xarray/issues/2636#issuecomment-450458650 https://api.github.com/repos/pydata/xarray/issues/2636 MDEyOklzc3VlQ29tbWVudDQ1MDQ1ODY1MA== zxdawn 30388627 2018-12-29T02:38:00Z 2018-12-29T02:39:41Z NONE

@dcherian It works by netCDF4, but not for xarray: ``` file = Dataset('ds1.nc') print (file.variables['time'],'\n')

with xr.open_dataset('ds1.nc') as f: print (f.time.attrs) Output: <class 'netCDF4._netCDF4.Variable'> int64 time(time) units: hours since 2015-01-01 unlimited dimensions: current shape = (3,) filling on, default _FillValue of -9223372036854775806 used

OrderedDict() ```

What's the difference between units and attrs?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  open_mfdataset change the attributes of Coordinates 394625579
450456616 https://github.com/pydata/xarray/issues/2636#issuecomment-450456616 https://api.github.com/repos/pydata/xarray/issues/2636 MDEyOklzc3VlQ29tbWVudDQ1MDQ1NjYxNg== zxdawn 30388627 2018-12-29T02:17:49Z 2018-12-29T02:17:49Z NONE

@xylar Thanks! I just found another question similar to this one.

I've tried some operations: with xr.open_dataset('merge.nc') as f: print (f['temperature'],'\n') print ('---------------------------') print (f.mean(dim='time')) print ('---------------------------') print (f['temperature'].loc[:,:,'2015-01-05T04:00:00',]) print ('---------------------------')

It works fine: ``` <xarray.DataArray 'temperature' (x: 2, y: 2, time: 6)> array([[[-0.022611, -1.428088, -0.655508, 0.977389, -0.428088, 0.344492], [ 0.430102, 0.996973, -0.882054, 1.430102, 1.996973, 0.117946]],

   [[ 0.157233, -0.230397, -0.505775,  1.157233,  0.769603,  0.494225],
    [-0.075826, -1.933904, -0.823982,  0.924174, -0.933904,  0.176018]]])

Coordinates: lon (x, y) float64 ... lat (x, y) float64 ... * time (time) datetime64[ns] 2015-01-05T04:00:00 2015-01-05T05:00:00 ... Dimensions without coordinates: x, y


<xarray.Dataset> Dimensions: (x: 2, y: 2) Coordinates: lon (x, y) float64 ... lat (x, y) float64 ... Dimensions without coordinates: x, y Data variables: temperature (x, y) float64 -0.2021 0.6817 0.307 -0.4446


<xarray.DataArray 'temperature' (x: 2, y: 2)> array([[-0.022611, 0.430102], [ 0.157233, -0.075826]]) Coordinates: lon (x, y) float64 ... lat (x, y) float64 ... time datetime64[ns] 2015-01-05T04:00:00 Dimensions without coordinates: x, y


```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  open_mfdataset change the attributes of Coordinates 394625579
450455452 https://github.com/pydata/xarray/issues/2636#issuecomment-450455452 https://api.github.com/repos/pydata/xarray/issues/2636 MDEyOklzc3VlQ29tbWVudDQ1MDQ1NTQ1Mg== xylar 4179064 2018-12-29T02:07:54Z 2018-12-29T02:07:54Z NONE

@zxdawn, I was able to verify that, by adding decode_times=False to your code, I get: ``` keys of merge: odict_keys(['lon', 'lat', 'temperature', 'time'])

time of merge: <class 'netCDF4._netCDF4.Variable'> int64 time(time) units: hours since 2015-01-01 unlimited dimensions: current shape = (6,) filling on, default _FillValue of -9223372036854775806 used ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  open_mfdataset change the attributes of Coordinates 394625579
450400275 https://github.com/pydata/xarray/issues/2636#issuecomment-450400275 https://api.github.com/repos/pydata/xarray/issues/2636 MDEyOklzc3VlQ29tbWVudDQ1MDQwMDI3NQ== xylar 4179064 2018-12-28T17:54:19Z 2018-12-28T17:54:19Z NONE

Depending on your needs, you might be able to get away with calling open_mfdataset with decode_times=False. This should leave your time coordinate as it is (i.e. integer hours since 2015-01-01) but that will limit the types of operations you can do on the time dimension because it will not be converted to some kind of DateTime object. For example, it would be difficult to do time averaging that is aware of months, years, etc.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  open_mfdataset change the attributes of Coordinates 394625579

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

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]);
Powered by Datasette · Queries took 13.125ms · About: xarray-datasette