Skip to content

Document that Series.unique order may differ from pandas - #12493

Open
PranavAchar01 wants to merge 1 commit into
dask:mainfrom
PranavAchar01:doc/11758-series-unique-order
Open

PranavAchar01 wants to merge 1 commit into
dask:mainfrom
PranavAchar01:doc/11758-series-unique-order

Conversation

@PranavAchar01

Copy link
Copy Markdown

Closes #11758.

Adds a Notes section to Series.unique documenting that the order of the
returned values is not guaranteed to match pandas, because the unique values are
combined across partitions with a shuffle (which does not preserve input order),
and that passing split_out=1 preserves the original order for low-cardinality
data.

This follows the maintainers' explanation in the issue:

  • @phofl: "This is expected. We are triggering a shuffle under the hood ... a shuffle won't preserve the input order. I'll label this as a documentation issue."
  • @rjzamora: the "tree-reduction" version (split_out=1) preserves the original order.

Docstring-only change.

Disclosure: this documentation change was prepared with the assistance of Claude Code and reviewed against the maintainers' comments in the issue.

Add a Notes section to Series.unique explaining that, unlike pandas, the order
of the returned values is not guaranteed because a shuffle is used to combine
partitions, and that split_out=1 preserves the original order for
low-cardinality data.

Closes dask#11758
Copilot AI review requested due to automatic review settings July 7, 2026 07:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

     25 files  ±0       25 suites  ±0   7h 7m 40s ⏱️ - 3m 43s
 19 914 tests ±0   18 481 ✅ ±0   1 433 💤 ±0  0 ❌ ±0 
379 353 runs  ±0  332 082 ✅  - 2  47 271 💤 +2  0 ❌ ±0 

Results for commit 60e8270. ± Comparison against base commit e0be880.

@github-actions github-actions Bot added the needs attention It's been a while since this was pushed on. Needs attention from the owner or a maintainer. label Aug 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs attention It's been a while since this was pushed on. Needs attention from the owner or a maintainer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document that Series.unique order differs from Pandas

2 participants