issues
2 rows where comments = 4 and "updated_at" is on date 2021-02-16 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date), closed_at (date)
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
603309899 | MDU6SXNzdWU2MDMzMDk4OTk= | 3985 | xarray=1.15.1 regression: Groupby drop multi-index | DancingQuanta 8419157 | closed | 0 | 4 | 2020-04-20T15:05:51Z | 2021-02-16T15:59:46Z | 2021-02-16T15:59:46Z | NONE | I have written a function MCVE Code Sample```python import xarray as xr DimensionsN = xr.DataArray(np.arange(100), dims='N', name='N') reps = xr.DataArray(np.arange(5), dims='reps', name='reps') horizon = xr.DataArray([1, -1], dims='horizon', name='horizon') horizon.attrs = {'long_name': 'Horizonal', 'units': 'H'} vertical = xr.DataArray(np.arange(1, 4), dims='vertical', name='vertical') vertical.attrs = {'long_name': 'Vertical', 'units': 'V'} Variablesx = xr.DataArray(np.random.randn(len(N), len(reps), len(horizon), len(vertical)), dims=['N', 'reps', 'horizon', 'vertical'], name='x') y = x * 0.1 y.name = 'y' Merge x, ydata = xr.merge([x, y]) Assign coordsdata = data.assign_coords(reps=reps, vertical=vertical, horizon=horizon) Function that stack all but one diensions and groupby over the stacked dimension.def process_stacked_groupby(ds, dim, func, *args):
Function to apply on groupbydef fn(ds): return ds Run groupby with applied functiondata.pipe(process_stacked_groupby, 'N', fn) ``` Expected OutputPrior to xarray=0.15.0, the above code produce a result that I wanted. The function should be able to 1. stack chosen dimensions 2. groupby the stacked dimension 3. apply a function on each group a. The function actually passes along another function with unstacked group coord b. Add multi-index stacked group coord back to the results of this function 4. combine the groups 5. Unstack stacked dimension Problem DescriptionAfter upgrading to 0.15.1, the above code stopped working.
The error occurred at the line
Versions0.15.1 |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3985/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | xarray 13221727 | issue | ||||||
748229907 | MDU6SXNzdWU3NDgyMjk5MDc= | 4598 | Calling pd.to_datetime on cftime variable | raybellwaves 17162724 | closed | 0 | 4 | 2020-11-22T12:14:27Z | 2021-02-16T02:42:35Z | 2021-02-16T02:42:35Z | CONTRIBUTOR | It would be nice to be able to convert cftime variables to pandas datetime to utilize the functionality there. I understand this is an upstream issue as pandas probably isn't aware of cftime. However, i'm curious if a method could be added to cftime such as .to_dataframe(). I've found ``` import xarray as xr import numpy as np import pandas as pd date_str = '2020-01-01' date_np = np.datetime64(date_str)
date_cf = xr.cftime_range(start=date_str, periods=1)[0] pd.to_datetime(date_cf)
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4598/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
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]);