home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 216445714

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/242#issuecomment-216445714 https://api.github.com/repos/pydata/xarray/issues/242 216445714 MDEyOklzc3VlQ29tbWVudDIxNjQ0NTcxNA== 167164 2016-05-03T06:04:47Z 2016-05-03T06:04:47Z NONE

Not sure if it's worth a separate feature request, but it'd be great to have a drop option in .isel() as well. For example:

``` python

ds <xarray.Dataset> Dimensions: (lat: 360, lon: 720, time: 2928) Coordinates: * lon (lon) float64 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 ... * lat (lat) float64 -89.75 -89.25 -88.75 -88.25 -87.75 -87.25 -86.75 ... * time (time) datetime64[ns] 2012-01-01 2012-01-01T03:00:00 ... Data variables: dswrf (time, lat, lon) float64 446.5 444.9 445.3 447.8 452.4 456.3 ...

ds.isel(lat=0, lon=0, drop=True) <xarray.Dataset> Dimensions: (time: 2928) Coordinates: * time (time) datetime64[ns] 2012-01-01 2012-01-01T03:00:00 ... Data variables: dswrf (time) float64 446.5 444.9 445.3 447.8 452.4 456.3 ... ```

This would be useful for making .to_dataframe() more efficient, too, I suspect, since I have to currently do forcing.isel(lat=0, lon=0).to_dataframe()[['dswrf']] to remove the (constant) lat/lon data from the dataframe.

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