Skip to content

Preserve label ordering for multi-variable GroupBy #10151

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

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

dcherian
Copy link
Contributor

  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst

@dcherian dcherian force-pushed the fix-grouped-order branch from 75f5c8b to 583a3d2 Compare March 19, 2025 18:59
@@ -3147,7 +3147,36 @@ def test_time_grouping_seasons_specified():
assert_identical(actual, expected.reindex(season=labels))


def test_groupby_multiple_bin_grouper_missing_groups():
def test_multiple_grouper_unsorted_order() -> None:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is hard to review, but I would appreciate someone taking a look at this test.

@dcherian dcherian added the plan to merge Final call for comments label Mar 21, 2025
@dcherian dcherian merged commit 4174aa1 into pydata:main Mar 24, 2025
37 checks passed
dcherian added a commit to dcherian/xarray that referenced this pull request Mar 25, 2025
* upstream/main:
  Move chunks-related functions to a new file (pydata#10172)
  Preserve label ordering for multi-variable GroupBy (pydata#10151)
  Update DataArray.to_zarr to match Dataset.to_zarr. (pydata#10164)
  Fix numpy advanced indexing docs link (pydata#10160)
  Forbid datatree to zarr append dim (pydata#10156)
  Fix GitHub Actions badge in README (pydata#10155)
  Add dev whats-new (pydata#10152)
  Release 2025.03.0 (pydata#10143)
@dcherian dcherian deleted the fix-grouped-order branch March 26, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan to merge Final call for comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy