-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
Arrowpyarrow functionalitypyarrow functionalityBugUpstream issueIssue related to pandas dependencyIssue related to pandas dependencypyarrow dtype retentionop with pyarrow dtype -> expect pyarrow resultop with pyarrow dtype -> expect pyarrow result
Description
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.
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
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
Labels
Arrowpyarrow functionalitypyarrow functionalityBugUpstream issueIssue related to pandas dependencyIssue related to pandas dependencypyarrow dtype retentionop with pyarrow dtype -> expect pyarrow resultop with pyarrow dtype -> expect pyarrow result
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
mroeschke commentedon Apr 4, 2024
Looks to be a pyarrow bug
WillAyd commentedon Apr 4, 2024
Very nice catch. Just opened apache/arrow#41017