You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Krisztian Szucs (Jira)" <ji...@apache.org> on 2020/04/14 11:09:00 UTC
[jira] [Assigned] (ARROW-8442) [Python] NullType.to_pandas_dtype
inconsisent with dtype returned in to_pandas/to_numpy
[ https://issues.apache.org/jira/browse/ARROW-8442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Krisztian Szucs reassigned ARROW-8442:
--------------------------------------
Assignee: Joris Van den Bossche
> [Python] NullType.to_pandas_dtype inconsisent with dtype returned in to_pandas/to_numpy
> ---------------------------------------------------------------------------------------
>
> Key: ARROW-8442
> URL: https://issues.apache.org/jira/browse/ARROW-8442
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Reporter: Joris Van den Bossche
> Assignee: Joris Van den Bossche
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.17.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> There is this behaviour of {{to_pandas_dtype}} returning float, while all actual conversions to numpy or pandas use object dtype:
> {code}
> In [23]: pa.null().to_pandas_dtype()
> Out[23]: numpy.float64
> In [24]: pa.array([], pa.null()).to_pandas()
> Out[24]: Series([], dtype: object)
> In [25]: pa.array([], pa.null()).to_numpy(zero_copy_only=False)
> Out[25]: array([], dtype=object)
> {code}
> So we should probably fix {{NullType.to_pandas_dtype}} to return object, which is used in practice.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)