home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 464949490

This data as json

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/2191#issuecomment-464949490 https://api.github.com/repos/pydata/xarray/issues/2191 464949490 MDEyOklzc3VlQ29tbWVudDQ2NDk0OTQ5MA== 6628425 2019-02-19T02:04:39Z 2019-02-19T02:04:39Z MEMBER

@zzheng93 welcome! One way to install the development version is to clone this repo, and do an editable install: $ git clone https://github.com/pydata/xarray.git $ cd xarray $ pip install -e . Then using resample with a daily frequency would look something like: ``` In [1]: import xarray as xr

In [2]: times = xr.cftime_range('2000', periods=4, freq='12H')

In [3]: times Out[3]: CFTimeIndex([2000-01-01 00:00:00, 2000-01-01 12:00:00, 2000-01-02 00:00:00, 2000-01-02 12:00:00], dtype='object')

In [4]: da = xr.DataArray(range(4), [('time', times)])

In [5]: da.resample(time='D').mean() Out[5]: <xarray.DataArray (time: 2)> array([0.5, 2.5]) Coordinates: * time (time) object 2000-01-01 00:00:00 2000-01-02 00:00:00 ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  327089588
Powered by Datasette · Queries took 0.502ms · About: xarray-datasette