home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 483455690

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/2894#issuecomment-483455690 https://api.github.com/repos/pydata/xarray/issues/2894 483455690 MDEyOklzc3VlQ29tbWVudDQ4MzQ1NTY5MA== 1217238 2019-04-15T23:29:48Z 2019-04-15T23:29:48Z MEMBER

For context: we didn't explicitly implement a .get() method on Dataset, we get it implemented for free because xarray.Dataset inherits from collections.abc.Mapping. So the only practical difference between .get() and [] on Dataset is the same as the difference for a general Python mapping: .get() returns a default value (which defaults to None) instead of raising KeyError.

I'm not sure it's particularly useful to show examples using .get() here, unless we want to show this difference in behavior if a key is not found.

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