home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 279595497

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
279595497 MDExOlB1bGxSZXF1ZXN0MTU2NjIwNjM4 1762 ENH: Add dt.date accessor. 2448579 closed 0     5 2017-12-06T01:43:51Z 2018-05-10T05:12:15Z 2018-01-14T00:28:11Z MEMBER   0 pydata/xarray/pulls/1762

This PR lets us access dt.date thereby removing all higher frequency time information.

Use case: Just like dayofyear but easier to interpret when only looking at 1 year of data.

Example: Start with da.time <xarray.DataArray 'time' (time: 8737)> array(['2014-01-01T00:00:00.000000000', '2014-01-01T01:00:00.000000000', '2014-01-01T02:00:00.000000000', ..., '2014-12-30T22:00:00.000000000', '2014-12-30T23:00:00.000000000', '2014-12-31T00:00:00.000000000'], dtype='datetime64[ns]') Coordinates: * time (time) datetime64[ns] 2014-01-01 2014-01-01T01:00:00 ...

then da.time.dt.date yields <xarray.DataArray 'date' (time: 8737)> array(['2014-01-01T00:00:00.000000000', '2014-01-01T00:00:00.000000000', '2014-01-01T00:00:00.000000000', ..., '2014-12-30T00:00:00.000000000', '2014-12-30T00:00:00.000000000', '2014-12-31T00:00:00.000000000'], dtype='datetime64[ns]') Coordinates: * time (time) datetime64[ns] 2014-01-01 2014-01-01T01:00:00 ...

  • [x] Tests added (for all bug fixes or enhancements)
  • [x] Tests passed (for all non-documentation changes)
  • [x] Passes git diff upstream/master **/*py | flake8 --diff (remove if you did not edit any Python files)
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API (remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later)
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1762/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

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