[
https://issues.apache.org/jira/browse/ARROW-8223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17067214#comment-17067214
]
Wes McKinney commented on ARROW-8223:
-------------------------------------
{{Schema.from_pandas}} hasn't been very actively maintained. It hasn't acquired
support for pandas ExtensionDType yet
> [Python] Schema.from_pandas breaks with pandas nullable integer dtype
> ---------------------------------------------------------------------
>
> Key: ARROW-8223
> URL: https://issues.apache.org/jira/browse/ARROW-8223
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.15.0, 0.16.0, 0.15.1
> Environment: pyarrow 0.16
> Reporter: Ged Steponavicius
> Priority: Minor
> Labels: easyfix
>
>
> {code:java}
> import pandas as pd
> import pyarrow as pa
> df = pd.DataFrame([{'int_col':1},
> {'int_col':2}])
> df['int_col'] = df['int_col'].astype(pd.Int64Dtype())
> schema = pa.Schema.from_pandas(df)
> {code}
> produces ArrowTypeError: Did not pass numpy.dtype object
>
> However, this works fine
> {code:java}
> schema = pa.Table.from_pandas(df).schema{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)