home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where author_association = "MEMBER" and issue = 1723010051 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

  • mathause 6

issue 1

  • Nan Values never get deleted · 6 ✖

author_association 1

  • MEMBER · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1568557130 https://github.com/pydata/xarray/issues/7871#issuecomment-1568557130 https://api.github.com/repos/pydata/xarray/issues/7871 IC_kwDOAMm_X85dfkhK mathause 10194086 2023-05-30T14:40:50Z 2023-05-30T14:40:50Z MEMBER

I am closing this. Feel free to re-open/ or open a new issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Nan Values never get deleted 1723010051
1562707652 https://github.com/pydata/xarray/issues/7871#issuecomment-1562707652 https://api.github.com/repos/pydata/xarray/issues/7871 IC_kwDOAMm_X85dJQbE mathause 10194086 2023-05-25T11:02:29Z 2023-05-25T11:02:29Z MEMBER

Yes float64 should cause less imprecision. You can convert using astype:

```python import numpy as np import xarray as xr

da = xr.DataArray(np.array([1, 2], dtype=np.float32))

da = da.astype(float) ```

As for the other problems I think you are better of asking the people over at rioxarray. However, you should first gather all the steps you did to convert the data as code. This way it is easier to see what you are actually doing.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Nan Values never get deleted 1723010051
1562605326 https://github.com/pydata/xarray/issues/7871#issuecomment-1562605326 https://api.github.com/repos/pydata/xarray/issues/7871 IC_kwDOAMm_X85dI3cO mathause 10194086 2023-05-25T09:44:31Z 2023-05-25T09:44:31Z MEMBER

xarray handles nan values and ignores them per default - so you don't need to remove them. For example: ```python import numpy as np import xarray as xr

da = xr.DataArray([1, 2, 3, np.nan]) da.mean() `` If you have precision problems - that might be because you havefloat32` values.

I don't know what goes wrong with your lon values - that is an issue in the reprojection. You could convert them to 0...360 by using

```python

lon_dim = "x" new_lon = np.mod(da[lon_dim], 360) da = da.assign_coords({lon_dim: new_lon}) da.reindex({lon_dim : np.sort(da[lon_dim])})

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Nan Values never get deleted 1723010051
1560777789 https://github.com/pydata/xarray/issues/7871#issuecomment-1560777789 https://api.github.com/repos/pydata/xarray/issues/7871 IC_kwDOAMm_X85dB5Q9 mathause 10194086 2023-05-24T09:32:46Z 2023-05-24T09:32:46Z MEMBER

Yes but there are less - so as mentioned it removes all columns/ rows with only nans, if there is at least one non-nan value the row is kept.

What is the reason that you want to get rid of the nan values?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Nan Values never get deleted 1723010051
1560587282 https://github.com/pydata/xarray/issues/7871#issuecomment-1560587282 https://api.github.com/repos/pydata/xarray/issues/7871 IC_kwDOAMm_X85dBKwS mathause 10194086 2023-05-24T07:24:37Z 2023-05-24T07:24:37Z MEMBER

Can you try notnull instead of isnull - I often get the boolean array wrong in where:

python da = ds['z'] da = da.where(da.notnull(), drop=True)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Nan Values never get deleted 1723010051
1560572196 https://github.com/pydata/xarray/issues/7871#issuecomment-1560572196 https://api.github.com/repos/pydata/xarray/issues/7871 IC_kwDOAMm_X85dBHEk mathause 10194086 2023-05-24T07:12:28Z 2023-05-24T07:12:28Z MEMBER

What is the reason that you want to get rid of the nan values?

The reason they come back is that are needed to fill the grid again. The dataframe is 1D but the dataarray is 2D.

What you can try is to use where:

python da = ds['z'] da = da.where(da.isnull(), drop=True) but it will only drop the values if the entire row/ column is nan.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Nan Values never get deleted 1723010051

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