home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 601927475

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/3873#issuecomment-601927475 https://api.github.com/repos/pydata/xarray/issues/3873 601927475 MDEyOklzc3VlQ29tbWVudDYwMTkyNzQ3NQ== 14808389 2020-03-20T21:57:21Z 2020-03-20T21:57:21Z MEMBER

to answer your question, at least partially: python In [3]: df = pd.DataFrame({ ...: "lat": np.linspace(-90, 90, 10), ...: "lon": np.linspace(0, 360, 10), ...: "data": np.arange(10), ...: }) ...: df.set_index(["lat", "lon"]).to_xarray() Out[3]: <xarray.Dataset> Dimensions: (lat: 10, lon: 10) Coordinates: * lat (lat) float64 -90.0 -70.0 -50.0 -30.0 -10.0 ... 30.0 50.0 70.0 90.0 * lon (lon) float64 0.0 40.0 80.0 120.0 160.0 ... 240.0 280.0 320.0 360.0 Data variables: data (lat, lon) float64 0.0 nan nan nan nan nan ... nan nan nan nan 9.0 so the levels of the multi-index of the DataFrame are the dimension coordinates of the Dataset.

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