home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 728840803

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
728840803 MDExOlB1bGxSZXF1ZXN0NTA5NDY5MDIw 4533 GH4228 Clearer error on scalar to dataframe 15890747 closed 0     4 2020-10-24T17:52:09Z 2020-10-26T08:51:39Z 2020-10-26T08:42:35Z CONTRIBUTOR   0 pydata/xarray/pulls/4533

When attempting to convert a scalar to a dataframe, as e.g.:

xarray.DataArray([1], coords=[('onecoord', [2])]).sel(onecoord=2).to_dataframe(name='name')

raise

ValueError: cannot convert a scalar to a Dataframe

instead of

ValueError: no valid index for a 0-dimensional object

  • [x] Closes #4228
  • [x] Tests added
  • [x] Passes isort . && black . && mypy . && flake8.
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

    I was not sure if this was "notable". Please let me know if I should add.

  • [ ] New functions/methods are listed in api.rst

    n / a

I was not able to run all tests, but was able to run the changed one (more on that in the issue).

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

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.743ms · About: xarray-datasette