home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 458808896

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/2724#issuecomment-458808896 https://api.github.com/repos/pydata/xarray/issues/2724 458808896 MDEyOklzc3VlQ29tbWVudDQ1ODgwODg5Ng== 1217238 2019-01-30T04:36:27Z 2019-01-30T04:36:27Z MEMBER

When we first added zarr support, either it didn't support variable length strings or I didn't know about it! (see https://github.com/zarr-developers/zarr-specs/issues/6). But zarr definitely does support variable length strings now (https://zarr.readthedocs.io/en/stable/tutorial.html#string-arrays), and I think it would be pretty easy to support in xarray, too.

You'd need to set allows_unicode=True here: https://github.com/pydata/xarray/blob/e8bf4bf9a744148f1f6586cabe7f5c5ef6e9bf26/xarray/backends/zarr.py#L211-L216

and then be sure to pass in dtype=str when constructing the zarr array (see _nc4_dtype in the netCDF4 backend for an example of this)

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