Closed
Description
As requested here plotly/plotly.py#4790 (comment)
We already have maintain_order
for DataFrame.unique
, my concern is that for some libraries this may turn out to not be guaranteed (and for there to not be any option to guarantee it)
However, a workaround like
token = f'{s.name}_tmp'
s.to_frame().with_row_index(token).unique(col).sort(token).get_column(col)
should always be possible, were some library to stop guaranteeing it
It's not clear to me whether PyArrow makes any guarantees - we can always just use it for now, and if it stop making such guarantees, we use the workaround above apache/arrow#44663