home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 441467391

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/2568#issuecomment-441467391 https://api.github.com/repos/pydata/xarray/issues/2568 441467391 MDEyOklzc3VlQ29tbWVudDQ0MTQ2NzM5MQ== 1217238 2018-11-25T19:50:16Z 2018-11-25T19:50:16Z MEMBER

I would lean slightly against adding a dedicated method for this (but could be convinced if others are interested). Usually we copy pandas or numpy APIs, but DataFrame.map is a not a great name -- map means too many other things (e.g., consider the buildin map).

It might make sense to copy the design of numpy.select instead: https://docs.scipy.org/doc/numpy/reference/generated/numpy.select.html

e.g., you could write something like xarray.select([ds < 0, ds < 10], [5, 10], default=15)

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