home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 314007170

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/1472#issuecomment-314007170 https://api.github.com/repos/pydata/xarray/issues/1472 314007170 MDEyOklzc3VlQ29tbWVudDMxNDAwNzE3MA== 1217238 2017-07-10T05:09:05Z 2017-07-10T05:09:05Z MEMBER

drop=True is actually intended to control dropping scalar coordinates, but the result of indexing with '2012' isn't producing a scalar. In this case, what you need is to squeeze out the length one dimension, with .squeeze().

The counter intuitive behavior you are seeing for indexing with a string for a year like arr.sel(time='2012') is something we inherit upstream from pandas: http://pandas.pydata.org/pandas-docs/stable/timeseries.html#slice-vs-exact-match

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