lorentzenchr commented on issue #29887:
URL: https://github.com/apache/arrow/issues/29887#issuecomment-1792046228

   As the dictionary is specified as `["c", "a", "b"]`, I would have expected 
to preserve that ordering resulting in a decoded array `["c", "c", "a", "b", 
"b"]`, or to have the option to do so.
   
   With pandas ordered categoricals:
   ```python
   import pandas as pd
   
   s = pd.Series(pd.Categorical(["b", "c", "b", "a", "c"], categories=["c", 
"a", "b"], ordered=True))
   s  # b c b a c
   
   s.sort_values()  # c c a b b
   ```
   Use case: Being able to specify the sort order can make plots or reported 
tables much easier to create.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to