home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where issue = 1624520287 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • husainridwan 7
  • headtr1ck 3

author_association 2

  • NONE 7
  • COLLABORATOR 3

issue 1

  • Add method to format xarray.DataArray as strings for issue #5985 · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1490323477 https://github.com/pydata/xarray/pull/7628#issuecomment-1490323477 https://api.github.com/repos/pydata/xarray/issues/7628 IC_kwDOAMm_X85Y1IgV husainridwan 61923007 2023-03-30T13:39:12Z 2023-03-30T13:39:12Z NONE

@keewis @TomNicholas @headtr1ck any comments?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add method to format xarray.DataArray as strings for issue #5985 1624520287
1476754932 https://github.com/pydata/xarray/pull/7628#issuecomment-1476754932 https://api.github.com/repos/pydata/xarray/issues/7628 IC_kwDOAMm_X85YBX30 husainridwan 61923007 2023-03-20T18:44:13Z 2023-03-20T18:44:13Z NONE

@keewis it seems .str.format does what we want the issue is requesting. Is there any need for the issue or can you clarify exactly what needs to be improved?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add method to format xarray.DataArray as strings for issue #5985 1624520287
1474755366 https://github.com/pydata/xarray/pull/7628#issuecomment-1474755366 https://api.github.com/repos/pydata/xarray/issues/7628 IC_kwDOAMm_X85X5vsm husainridwan 61923007 2023-03-18T07:10:34Z 2023-03-18T07:10:34Z NONE

@headtr1ck @keewis can you check it now? I’ve modified it a bit

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add method to format xarray.DataArray as strings for issue #5985 1624520287
1471413892 https://github.com/pydata/xarray/pull/7628#issuecomment-1471413892 https://api.github.com/repos/pydata/xarray/issues/7628 IC_kwDOAMm_X85Xs_6E headtr1ck 43316012 2023-03-16T06:53:52Z 2023-03-16T06:53:52Z COLLABORATOR

Again, I think that this implementation is too specific and the issue wanted a more general string formatting option.

Also, auch a method is better kept as part of the StrAccessor.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add method to format xarray.DataArray as strings for issue #5985 1624520287
1471402226 https://github.com/pydata/xarray/pull/7628#issuecomment-1471402226 https://api.github.com/repos/pydata/xarray/issues/7628 IC_kwDOAMm_X85Xs9Dy husainridwan 61923007 2023-03-16T06:40:26Z 2023-03-16T06:40:26Z NONE

@TomNicholas & @headtr1ck , Can you review this so I can know what to change? I think it's failing just one test

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add method to format xarray.DataArray as strings for issue #5985 1624520287
1469866148 https://github.com/pydata/xarray/pull/7628#issuecomment-1469866148 https://api.github.com/repos/pydata/xarray/issues/7628 IC_kwDOAMm_X85XnGCk husainridwan 61923007 2023-03-15T11:52:48Z 2023-03-15T11:52:48Z NONE

@k

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add method to format xarray.DataArray as strings for issue #5985 1624520287
1469756497 https://github.com/pydata/xarray/pull/7628#issuecomment-1469756497 https://api.github.com/repos/pydata/xarray/issues/7628 IC_kwDOAMm_X85XmrRR husainridwan 61923007 2023-03-15T10:35:06Z 2023-03-15T10:35:06Z NONE

I think the initial issue was to create a method that allows any specific significant figure to be used and then formatted as strings after. I think I'm having issues with a floating dtype. Check the image below

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add method to format xarray.DataArray as strings for issue #5985 1624520287
1469697108 https://github.com/pydata/xarray/pull/7628#issuecomment-1469697108 https://api.github.com/repos/pydata/xarray/issues/7628 IC_kwDOAMm_X85XmcxU headtr1ck 43316012 2023-03-15T09:57:12Z 2023-03-15T09:57:12Z COLLABORATOR

By the way, this works (but probably slow?):

```python

def tostr(x): return f"{:.2f}"

tostr_v = np.vectorize(tostr)

da = xr.DataArray([1, 2, 3.456], dims="x")

tostr_v(da) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add method to format xarray.DataArray as strings for issue #5985 1624520287
1469677146 https://github.com/pydata/xarray/pull/7628#issuecomment-1469677146 https://api.github.com/repos/pydata/xarray/issues/7628 IC_kwDOAMm_X85XmX5a headtr1ck 43316012 2023-03-15T09:43:57Z 2023-03-15T09:44:33Z COLLABORATOR

Wouldn't it be more useful to have something like da.str.format("sometext: {:2.2f}")

Or maybe da.as_str(...)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add method to format xarray.DataArray as strings for issue #5985 1624520287
1469066498 https://github.com/pydata/xarray/pull/7628#issuecomment-1469066498 https://api.github.com/repos/pydata/xarray/issues/7628 IC_kwDOAMm_X85XkC0C husainridwan 61923007 2023-03-15T00:48:53Z 2023-03-15T00:48:53Z NONE

@TomNicholas Can you review this for me?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add method to format xarray.DataArray as strings for issue #5985 1624520287

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