home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 423016453

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
423016453 MDU6SXNzdWU0MjMwMTY0NTM= 2824 Dataset.from_records()? 2418513 open 0     4 2019-03-20T00:46:19Z 2021-05-13T20:20:52Z   NONE      

Currently, to easily create a Dataset from an existing numpy recarray (not a DataArray, which is currently bugged anyway with recarrays due to #1434), I couldn't find an easier way than

python df = xr.Dataset.from_dataframe(pd.DataFrame(my_recarray).set_index('foo'))

(which is kind of dumb since it allocates the memory twice)

It would definitely be nice to be able to do just this (perhaps with extra arguments to set index on the fly etc):

python df = xr.Dataset.from_records(my_recarray, ...)

(Apologies if I'm missing something obvious.)

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2824/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

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