home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 535812301

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
535812301 MDU6SXNzdWU1MzU4MTIzMDE= 3609 Timedelta dt accessor does not work 189880 closed 0     4 2019-12-10T15:42:11Z 2019-12-18T15:27:31Z 2019-12-18T15:27:31Z NONE      

MCVE Code Sample

```python

Your code here

import xarray as xr import datetime as dt

now = dt.datetime.now() dt_array = xr.DataArray([now + dt.timedelta(seconds=i) for i in range(10)])

dt_array.dt.second #works

start_t = dt_array - dt_array[0] start_t.dt.second #fails ```

Expected Output

Last line should give me the time timedelta in seconds. Instead it raises an exception. Same for hour and minute.

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 158 Stepping 10, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None libhdf5: None libnetcdf: None xarray: 0.14.0 pandas: 0.25.3 numpy: 1.17.4 scipy: 1.2.1 netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: None distributed: None matplotlib: 3.1.1 cartopy: None seaborn: None numbagg: None setuptools: 42.0.2.post20191203 pip: 19.1.1 conda: None pytest: 5.0.0 IPython: 7.7.0 sphinx: 2.2.1
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3609/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 4 rows from issue in issue_comments
Powered by Datasette · Queries took 1.033ms · About: xarray-datasette