[ https://issues.apache.org/jira/browse/ARROW-14569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Li updated ARROW-14569: ----------------------------- Labels: beginner good-second-issue kernel (was: kernel) > [C++][Python] Support for pandas Categoricals with Intervals > ------------------------------------------------------------ > > Key: ARROW-14569 > URL: https://issues.apache.org/jira/browse/ARROW-14569 > Project: Apache Arrow > Issue Type: New Feature > Components: C++, Python > Affects Versions: 6.0.0 > Reporter: Alberto Torres > Priority: Minor > Labels: beginner, good-second-issue, kernel > > Trying to write a pandas categorical created from `pd.cut` fails with the > following error: > {code:python} > df_test = pd.DataFrame({"cat": pd.cut([1, 2, 3, 4, 5], bins=[2, 4])}) > df_test.to_parquet("test.parquet") > {code} > {code:python} > 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) > {code} > The problems seems to be the interval dtype. Specifing the `labels` keyword > solved the problem. -- This message was sent by Atlassian Jira (v8.3.4#803005)