You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document that Series.unique order differs from Pandas #11758
dataframedocumentationImprove or add to documentationneeds attentionIt's been a while since this was pushed on. Needs attention from the owner or a maintainer.
Running .unique on a Series differs from the output from pandas. I'm unsure if this is a bug or just a consequence of the move to query planning. If so, it would be nice to mention it in the docstring.
dataframedocumentationImprove or add to documentationneeds attentionIt's been a while since this was pushed on. Needs attention from the owner or a maintainer.
Activity
maximlt commentedon Feb 18, 2025
Note I think this is a behavior change, the previous dataframe implementation preserved data ordering as far as I can see. cc holoviz/hvplot#1499
phofl commentedon Feb 18, 2025
This is expected. We are triggering a shuffle under the hood to avoid overloading a single worker. And a shuffle won't preserve the input order.
I'll label this as a documentation issue
[-]`Series.unique` order differs from Pandas[/-][+]Document that `Series.unique` order differs from Pandas[/+]rjzamora commentedon Mar 19, 2025
Just a quick note that the "tree-reduction" version of unique (only good for low-cardinality data) will preserve the original order. E.g.
Document that Series.unique does not preserve order