Skip to content

BUG: pyarrow dictionary type ordered argument not respected #58152

@WillAyd

Description

@WillAyd

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

>>> dicttyp = pa.dictionary(pa.int8(), pa.string(), ordered=True)
>>> dicttyp.ordered
>>> pd.Series(["foo", "bar", "foo"], dtype=pd.ArrowDtype(dicttyp))
0    foo
1    bar
2    foo
dtype: dictionary<values=string, indices=int8, ordered=0>[pyarrow]


### Issue Description

The pyarrow type above is ordered, but that gets lost when forwarded to pandas

### Expected Behavior

order should be respected

### Installed Versions

main

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arrowpyarrow functionalityBugUpstream issueIssue related to pandas dependency

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions