You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Uwe Korn (Jira)" <ji...@apache.org> on 2020/03/26 10:54:00 UTC
[jira] [Resolved] (ARROW-8223) [Python] Schema.from_pandas breaks
with pandas nullable integer dtype
[ https://issues.apache.org/jira/browse/ARROW-8223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Korn resolved ARROW-8223.
-----------------------------
Fix Version/s: 0.17.0
Assignee: Uwe Korn
Resolution: Duplicate
I fixed this recently in master.
[~wesm] I maintain it, it simply works and thus doesn't need that much love except for the recent {{ExtensionArray}} fix.
> [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
> Assignee: Uwe Korn
> Priority: Minor
> Labels: easyfix
> Fix For: 0.17.0
>
>
>
> {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)