Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support xarray grouper objects in xarray interface #256

Open
dcherian opened this issue Jul 27, 2023 · 0 comments
Open

Support xarray grouper objects in xarray interface #256

dcherian opened this issue Jul 27, 2023 · 0 comments

Comments

@dcherian
Copy link
Collaborator

I think we need a new much improved interface that only uses Grouper objects following the API in pydata/xarray#6610 (comment), and potentially using a flox accessor (this may be a lot quicker than adding multiple grouper support to xarray directly)

We will need to make the Grouper objects public in Xarray first, but that's not a bad blocker.

data.flox.groupby({
	"x0": xr.BinGrouper(bins=pd.IntervalIndex.from_breaks(coords["x_vertices"])),  # binning
    "y": xr.UniqueGrouper(labels=["a", "b", "c"]),  # categorical, data.y is dask-backed
    "time": xr.TimeResampleGrouper(freq="MS")
	},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant