home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 585323675

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
585323675 MDU6SXNzdWU1ODUzMjM2NzU= 3873 Explanation of full DataFrame to Dataset translation 3274 open 0     4 2020-03-20T20:57:38Z 2020-03-20T23:13:25Z   CONTRIBUTOR      

Using to_xarray() on a DataFrame doesn't get me to the Dataset I want, because typically I want some of the DataFrame's columns to be coordinates, and some Data Variables.

This Stack Exchange question and answer give part of the solution: https://stackoverflow.com/questions/59672658/reassigning-xarray-data-variable-to-xarray-coordinate

This tells us how to turn some of the data variables in the translated data set into coordinates. But that's not the full solution, because we also need the coordinates to be applied to the data variables. Somehow we need to add the variables that are now coordinates as dimensions.

This is probably somewhere in the docs, but it isn't pulled together into a big picture answer. It would be great if there was an end-to-end example of taking a pandas DataFrame, partitioning variables into coordinates and data variables, and being able to use the resulting coordinates (with Dataset.sel()) to address the data variables.

If that is in the online docs, I don't know how to find it. Thanks!

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3873/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 4 rows from issue in issue_comments
Powered by Datasette · Queries took 0.714ms · About: xarray-datasette