home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

9 rows where issue = 365438396 and user = 41115380 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • am-thyst · 9 ✖

issue 1

  • da.loc[date[0]] brings up two instead of one · 9 ✖

author_association 1

  • NONE 9
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
426421471 https://github.com/pydata/xarray/issues/2450#issuecomment-426421471 https://api.github.com/repos/pydata/xarray/issues/2450 MDEyOklzc3VlQ29tbWVudDQyNjQyMTQ3MQ== am-thyst 41115380 2018-10-02T20:38:37Z 2018-10-02T20:38:37Z NONE

@spencerkclark yeah I was using a different platform, updated my xarray version and this works now, thanks!

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  da.loc[date[0]] brings up two instead of one 365438396
426394309 https://github.com/pydata/xarray/issues/2450#issuecomment-426394309 https://api.github.com/repos/pydata/xarray/issues/2450 MDEyOklzc3VlQ29tbWVudDQyNjM5NDMwOQ== am-thyst 41115380 2018-10-02T19:07:37Z 2018-10-02T19:07:37Z NONE

@spencerkclark ```python Traceback (most recent call last): File "/var/spool/torque/mom_priv/jobs/63347.rdf-xcat.SC", line 22, in <module> a = ml50_shear[0].where(ml50_shear[0] >= 11, other = 0)

NotImplementedError: The optional argument 'other' has not yet been implemented ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  da.loc[date[0]] brings up two instead of one 365438396
426384000 https://github.com/pydata/xarray/issues/2450#issuecomment-426384000 https://api.github.com/repos/pydata/xarray/issues/2450 MDEyOklzc3VlQ29tbWVudDQyNjM4NDAwMA== am-thyst 41115380 2018-10-02T18:35:32Z 2018-10-02T18:47:07Z NONE

@spencerkclark Oh you're right, I didn't think about that - it returns 4

Gonna try with just the first of the four

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  da.loc[date[0]] brings up two instead of one 365438396
426377815 https://github.com/pydata/xarray/issues/2450#issuecomment-426377815 https://api.github.com/repos/pydata/xarray/issues/2450 MDEyOklzc3VlQ29tbWVudDQyNjM3NzgxNQ== am-thyst 41115380 2018-10-02T18:17:10Z 2018-10-02T18:17:10Z NONE

@spencerkclark ah sorry I missed line 5 - I'm not looking to get the mean, I want to make sure the unusual values are still represented. That might be why mine went wrong, it generally only works when there's just one time. Anyway, here's what I tried: ```python import xarray as xr from function_codes import sfcwinds, complete_shear, winds import os pathway = #my pathway os.chdir(pathway)

sfc_winds = sfcwinds("sfc") ml50_winds = winds("ml50") ml50_shear = complete_shear(sfc_winds, ml50_winds)

a = ml50_shear.where(ml50_shear >= 11, other = 0) b = a.where(a == 0, other = 1) pa = (b.sum('time') / b.sizes['time']) * 100 print(pa) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  da.loc[date[0]] brings up two instead of one 365438396
426371853 https://github.com/pydata/xarray/issues/2450#issuecomment-426371853 https://api.github.com/repos/pydata/xarray/issues/2450 MDEyOklzc3VlQ29tbWVudDQyNjM3MTg1Mw== am-thyst 41115380 2018-10-02T17:59:47Z 2018-10-02T17:59:47Z NONE

@spencerkclark following your method: python AttributeError: 'tuple' object has no attribute 'where'

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  da.loc[date[0]] brings up two instead of one 365438396
426354773 https://github.com/pydata/xarray/issues/2450#issuecomment-426354773 https://api.github.com/repos/pydata/xarray/issues/2450 MDEyOklzc3VlQ29tbWVudDQyNjM1NDc3Mw== am-thyst 41115380 2018-10-02T17:10:45Z 2018-10-02T17:10:45Z NONE

@spencerkclark Thanks a lot, I'll give it a try 👍

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  da.loc[date[0]] brings up two instead of one 365438396
426346137 https://github.com/pydata/xarray/issues/2450#issuecomment-426346137 https://api.github.com/repos/pydata/xarray/issues/2450 MDEyOklzc3VlQ29tbWVudDQyNjM0NjEzNw== am-thyst 41115380 2018-10-02T16:45:17Z 2018-10-02T16:45:17Z NONE

@spencerkclark python a = da.loc[date[0]] #the initial time, obviously this part doesn't work but this is the methodology b = a.where(a >= threshold, other = 0) #keeps values that satisfy the threshold, sets the rest to 0 c = b.where(b == 0, other = 1) #sets all values that satisfy the threshold to 1 new_array = zero_array + c #zero_array is just an array of the same shape without time, set to 0 runs = runs + 1 Loops through this whole thing for every time (changing the loc to date[1], date[2], etc.), then: python percentage = (new_array / runs) * 100

This is not my complete code but you should get the idea, as I said it works fine with only 1 time per day

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  da.loc[date[0]] brings up two instead of one 365438396
426329598 https://github.com/pydata/xarray/issues/2450#issuecomment-426329598 https://api.github.com/repos/pydata/xarray/issues/2450 MDEyOklzc3VlQ29tbWVudDQyNjMyOTU5OA== am-thyst 41115380 2018-10-02T15:58:21Z 2018-10-02T15:58:21Z NONE

@spencerkclark I'm creating a 2D array of the percentage of time each lon/lat coordinate exceeds a defined threshold. I did this fine before, but I was only using 1 time from each day

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  da.loc[date[0]] brings up two instead of one 365438396
426316501 https://github.com/pydata/xarray/issues/2450#issuecomment-426316501 https://api.github.com/repos/pydata/xarray/issues/2450 MDEyOklzc3VlQ29tbWVudDQyNjMxNjUwMQ== am-thyst 41115380 2018-10-02T15:24:21Z 2018-10-02T15:24:21Z NONE

@spencerkclark thanks for this, using '1979-01-01T00' works which is a relief. I am trying to use the method of date[number] because I have in excess of 4,000 times to go through. Is there a way to get it to work? I figured adding the %H would work, but obviously not!

Otherwise, at least I know I can revise my code to state the datetime explicitly.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  da.loc[date[0]] brings up two instead of one 365438396

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