home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 143107776

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
143107776 MDU6SXNzdWUxNDMxMDc3NzY= 801 dictionaries in labeled indexing with letter values 11950875 closed 0     2 2016-03-23T23:44:02Z 2016-03-24T16:05:23Z 2016-03-24T16:05:11Z CONTRIBUTOR      

An exception is raised when a letter is used in a dictionary as a labelled index. I believe this use of letter values is acceptable according to #291.

The error is:

ValueError: invalid literal for int() with base 10: 'b'

The work around is simple at least, the .loc keyword works as expected with dictionary labelled indexing.

``` test = np.random.randn(3, 3) test_xr = xr.DataArray(test, coords=[[1, 2, 3], ['a', 'b', 'c']], dims=['inter', 'alpha']) test_xr.loc[dict(inter=1)] test_xr[dict(inter=1)] test_xr.loc[dict(alpha='b')]

Throws a ValueError exception

test_xr[dict(alpha='b')] ```

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

Links from other tables

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