home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 426346137

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/2450#issuecomment-426346137 https://api.github.com/repos/pydata/xarray/issues/2450 426346137 MDEyOklzc3VlQ29tbWVudDQyNjM0NjEzNw== 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
}
  365438396
Powered by Datasette · Queries took 236.455ms · About: xarray-datasette