home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

1 row where state = "closed" and user = 2539336 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 1

  • issue 1

state 1

  • closed · 1 ✖

repo 1

  • xarray 1
id node_id number title user state locked assignee milestone comments created_at updated_at ▲ closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
429835266 MDU6SXNzdWU0Mjk4MzUyNjY= 2870 xr.concat changes dtype volkerjaenisch 2539336 closed 0     1 2019-04-05T16:19:16Z 2019-05-27T00:20:55Z 2019-05-27T00:20:55Z NONE      

Code Sample, a copy-pastable example if possible

```python

dataset_a.wind_quality_flag.dtype dtype('int64')

dataset_b.wind_quality_flag.dtype dtype('int64')

result = xr.concat((dataset_a, dataset_b), dim='time') result.wind_quality_flag.dtype dtype('float64')

dataset_a.wind_quality_flag <xarray.DataArray 'wind_quality_flag' (time: 1, altitude: 13)> array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) Coordinates: * time (time) datetime64[ns] 2018-12-27T11:30:00 * altitude (altitude) float64 210.0 245.0 281.0 ... 1.141e+03 1.177e+03 dataset_b.wind_quality_flag <xarray.DataArray 'wind_quality_flag' (time: 1, altitude: 10)> array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) Coordinates: * time (time) datetime64[ns] 2018-12-27T01:20:00 * altitude (altitude) float64 210.0 245.0 281.0 ... 1.213e+03 1.249e+03 result.wind_quality_flag <xarray.DataArray 'wind_quality_flag' (time: 2, altitude: 17)> array([[ 0., 0., 0., 0., 0., 0., nan, nan, 0., 0., 0., 0., 0., 0., 0., nan, nan], [ 0., 0., 0., nan, nan, nan, 0., 0., nan, nan, nan, nan, 0., 0., 0., 0., 0.]]) Coordinates: * altitude (altitude) float64 210.0 245.0 281.0 ... 1.213e+03 1.249e+03 * time (time) datetime64[ns] 2018-12-27T11:30:00 2018-12-27T01:20:00

```

Problem description

Using xr.concat to combine two datasets along the time axis. Dtype of variable wind_quality_flag changes from int64 to float. I suppose that this behavior has to do with NaN not available in int64 and the Datasets are not completely overlapping in the altitude dimension.

How can this conversion be avoided?

Expected Output

Combined Dataset with original datatype preserved.

Output of xr.show_versions()

>>> xr.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] python-bits: 64 OS: Linux OS-release: 4.9.0-8-amd64 machine: x86_64 processor: byteorder: little LC_ALL: None LANG: de_DE.UTF-8 LOCALE: de_DE.UTF-8 libhdf5: 1.10.2 libnetcdf: 4.4.1.1 xarray: 0.11.3 pandas: 0.24.1 numpy: 1.16.1 scipy: None netCDF4: 1.4.2 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.0.2.1 PseudonetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None cyordereddict: None dask: None distributed: None matplotlib: 3.0.2 cartopy: None seaborn: None setuptools: 40.6.2 pip: 18.1 conda: None pytest: None IPython: None sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2870/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed xarray 13221727 issue

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 4482.985ms · About: xarray-datasette