home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 43548881

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/pull/134#issuecomment-43548881 https://api.github.com/repos/pydata/xarray/issues/134 43548881 MDEyOklzc3VlQ29tbWVudDQzNTQ4ODgx 1217238 2014-05-19T20:00:48Z 2014-05-19T20:00:48Z MEMBER

The reason I cast all datetime64 to datetime64[ns] is because pandas will not let you make an Index of datetime64 objects with anything other than ns precision. If you try to make it an Index with dtype=object you'll actually get an array of datetime.datetime objects:

```

pd.Index(pd.date_range('2000-01-01', periods=5).values.astype('datetime64[us]'), dtype='object').values array([datetime.datetime(2000, 1, 1, 0, 0), datetime.datetime(2000, 1, 2, 0, 0), datetime.datetime(2000, 1, 3, 0, 0), datetime.datetime(2000, 1, 4, 0, 0), datetime.datetime(2000, 1, 5, 0, 0)], dtype=object) ```

But I do agree this is not terribly consistent nor fully thought through. And it should certainly be well-documented.

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