home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

1 row where state = "open", type = "issue" and user = 76110149 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 1

  • issue · 1 ✖

state 1

  • open · 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
1593589979 I_kwDOAMm_X85e_EDb 7545 DataArrray.resample() appears to ignore skipna parameter while taking annual mean arfriedman 76110149 open 0     3 2023-02-21T14:33:46Z 2023-02-21T17:04:46Z   CONTRIBUTOR      

What happened?

The skipna parameter appears to have no effect while annually resampling a monthly DataArray. I'm not sure if this is related to #6772

What did you expect to happen?

I expected da_yrA to be NaN since I am not skipping NaN values.

Minimal Complete Verifiable Example

```Python import numpy as np import pandas as pd import xarray as xr

data = np.arange(12) month_index = pd.date_range("2022-01","2022-12-31", freq="M") df = pd.DataFrame(index=month_index, data=data) df.index.name = "time" df.columns.name = "value" df.loc["2022-01":"2022-02"] = np.nan da = xr.DataArray(df)

these unexpectedly produce the same result

da_yrA = (da).resample(time="A-Dec", skipna=False).mean() da_yrB = (da).resample(time="A-Dec", skipna=True).mean()

print(da_yrA) print(da_yrB) ```

MVCE confirmation

  • [X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • [X] Complete example — the example is self-contained, including all data and the text of any traceback.
  • [X] Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • [X] New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

No response

Anything else we need to know?

No response

Environment

``` scipy: 1.10.0 netCDF4: 1.6.2 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.6.2 nc_time_axis: 1.4.1 PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2023.2.0 distributed: 2023.2.0 matplotlib: 3.7.0 cartopy: 0.21.1 seaborn: None numbagg: None fsspec: 2023.1.0 cupy: None pint: None sparse: 0.13.0 flox: None numpy_groupies: None setuptools: 67.3.2 pip: 23.0.1 conda: None pytest: None mypy: None IPython: 8.10.0 sphinx: None ```
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7545/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    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 1523.164ms · About: xarray-datasette