home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 232002705

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/895#issuecomment-232002705 https://api.github.com/repos/pydata/xarray/issues/895 232002705 MDEyOklzc3VlQ29tbWVudDIzMjAwMjcwNQ== 10194086 2016-07-12T10:37:50Z 2016-07-12T10:37:50Z MEMBER

I like (2) - I once needed this functionality and had to infer the drop_vars.

``` def get_drop_vars(variables, ds):

if isinstance(variables, basestring):
    variables = [variables]
else:
    variables = list(variables)

# all variables
drop_var = set(ds.variables.keys())

# do not drop: coordinates, variables and time bounds
keep_var = ds.coords.keys() + variables + ['time_bounds', 'time_bnds']

drop_var.difference_update(keep_var)

return drop_var`

```

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