home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 297875833

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/967#issuecomment-297875833 https://api.github.com/repos/pydata/xarray/issues/967 297875833 MDEyOklzc3VlQ29tbWVudDI5Nzg3NTgzMw== 1217238 2017-04-28T00:33:55Z 2017-04-28T00:40:43Z MEMBER

What would the signature of sortby() be then?

Maybe something like: sortby(variables, ascending=True), where variables can be any of: - name of a 1D variable in coords (on a DataArray) or coords/data_vars (on a Dataset): these get converted in a DataArray like self[name]. - a 1D DataArray, with a dimension found in self.dims - list of either of the above, either along the same or different dimensions (this could be added later)

So I think this covers all the use cases of sort_index(), but is slightly more general.

If you really want to sort a 1D DataArray by its own values, you would write da.sortby(da), but I agree that that will be rare.

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