-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Labels
Component: C++Component: PythonStatus: stale-warningIssues and PRs flagged as stale which are due to be closed if no indication otherwiseIssues and PRs flagged as stale which are due to be closed if no indication otherwiseType: enhancementgood-second-issue
Description
Trying to write a pandas categorical created from pd.cut fails with the following error:
df_test = pd.DataFrame({"cat": pd.cut([1, 2, 3, 4, 5], bins=[2, 4])})
df_test.to_parquet("test.parquet")File "pyarrow/error.pxi", line 120, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unsupported cast from dictionary<values=extension<pandas.interval<ArrowIntervalType>>, indices=int8, ordered=1> to extension<pandas.interval<ArrowIntervalType>> (no available cast function for target type)The problems seems to be the interval dtype. Specifing the labels keyword solved the problem.
Reporter: Alberto Torres
Related issues:
- [C++][Parquet] Writing DictionaryArrays with ExtensionType to Parquet (relates to)
- [C++] Cast dictionary of extension type to extension type (depends upon)
Note: This issue was originally created as ARROW-14569. Please see the migration documentation for further details.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: C++Component: PythonStatus: stale-warningIssues and PRs flagged as stale which are due to be closed if no indication otherwiseIssues and PRs flagged as stale which are due to be closed if no indication otherwiseType: enhancementgood-second-issue