home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1205346130

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/3476#issuecomment-1205346130 https://api.github.com/repos/pydata/xarray/issues/3476 1205346130 IC_kwDOAMm_X85H2B9S 44444001 2022-08-04T14:36:26Z 2022-08-04T14:36:26Z NONE

@delgadom I just noticed that your proposed solution has the side effect of also converting cftime objects (e.g., below) to unicode strings.

``` xarray.DataArray 'time' (time: 1) array([cftime.DatetimeNoLeap(2007, 7, 2, 12, 0, 0, 0, has_year_zero=True)], dtype=object)

``` I updated your lines using @Hoeze' clear function and that seems to work for now.

```[python] for v in list(ds.coords.keys()): if ds.coords[v].dtype == object: ds[v].encoding.clear()

for v in list(ds.variables.keys()):
    if ds[v].dtype == object:
        ds[v].encoding.clear()

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  516306758
Powered by Datasette · Queries took 0.613ms · About: xarray-datasette