home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 319329850 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 3

  • shoyer 2
  • blsqr 1
  • fujiisoup 1

author_association 2

  • MEMBER 3
  • CONTRIBUTOR 1

issue 1

  • Variable.__setitem__ coercing types on objects with a values property · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
484259391 https://github.com/pydata/xarray/issues/2097#issuecomment-484259391 https://api.github.com/repos/pydata/xarray/issues/2097 MDEyOklzc3VlQ29tbWVudDQ4NDI1OTM5MQ== shoyer 1217238 2019-04-17T21:00:00Z 2019-04-17T21:00:00Z MEMBER

Yes, we would still welcome a fix here.

We could probably change that line to something like: if isinstance(data, (pd.Series, pd.Index, pd.DataFrame)): data = data.values

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Variable.__setitem__ coercing types on objects with a values property 319329850
484255028 https://github.com/pydata/xarray/issues/2097#issuecomment-484255028 https://api.github.com/repos/pydata/xarray/issues/2097 MDEyOklzc3VlQ29tbWVudDQ4NDI1NTAyOA== blsqr 1700203 2019-04-17T20:46:55Z 2019-04-17T20:46:55Z CONTRIBUTOR

I was wondering if this is still up for consideration?

Thank you for your help! If I can be brought to better understand any constraints to adjacent issues, I can consider drafting a fix for this.

Same here.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Variable.__setitem__ coercing types on objects with a values property 319329850
385839554 https://github.com/pydata/xarray/issues/2097#issuecomment-385839554 https://api.github.com/repos/pydata/xarray/issues/2097 MDEyOklzc3VlQ29tbWVudDM4NTgzOTU1NA== shoyer 1217238 2018-05-02T01:36:34Z 2018-05-02T01:36:34Z MEMBER

We internally use many inhouse array-like classes and this line is used to avoid multiple nesting. I think we can change this line to more explicit type checking.

Agreed, we should do more explicit type checking. It's a little silly to assume that every object with a .values attribute is an xarray.DataArray, xarray.Variable, pandas.Series or pandas.DataFrame.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Variable.__setitem__ coercing types on objects with a values property 319329850
385830499 https://github.com/pydata/xarray/issues/2097#issuecomment-385830499 https://api.github.com/repos/pydata/xarray/issues/2097 MDEyOklzc3VlQ29tbWVudDM4NTgzMDQ5OQ== fujiisoup 6815844 2018-05-02T00:33:17Z 2018-05-02T00:33:17Z MEMBER

Thanks for the report.

We did not consider to store an object type array other than string, but it should be supported.

I think we should improve this line, https://github.com/pydata/xarray/blob/39b2a37207fc8e6c5199ba9386831ba7eb06d82b/xarray/core/variable.py#L171-L172

We internally use many inhouse array-like classes and this line is used to avoid multiple nesting. I think we can change this line to more explicit type checking.

Currently, the following does not work either python In [11]: xr.DataArray(HasValues, dims=[]) Out[11]: <xarray.DataArray ()> array(5)

For your perticular purpose, the following will be working bad_indexed.loc[{'dim_0': 0}] = np.array(HasValues(), dtype=object)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Variable.__setitem__ coercing types on objects with a values property 319329850

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 2963.874ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows