You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Miguel Cantón Cortés (Jira)" <ji...@apache.org> on 2021/09/15 14:48:00 UTC

[jira] [Updated] (ARROW-14004) to_pandas() converts to float instead of using pandas nullable types

     [ https://issues.apache.org/jira/browse/ARROW-14004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Miguel Cantón Cortés updated ARROW-14004:
-----------------------------------------
    Description: 
We've noticed that when converting an Arrow Table to pandas using `.to_pandas()` integer columns with null values get converted to float instead of using pandas nullable types.

If the column was created with pandas first it is correctly preserved (I guess it's using stored metadata for this).

I've attached a screenshot showing this behavior.

As currently there is support for nullable types in pandas, just as in Arrow, it would be great to use these types when dealing with columns with null values.

If you are reticent to change this behavior, a param would be nice too (e.g. `to_pandas(use_nullable_types: True)`).

 

  was:
We've noticed that when converting an Arrow Table to pandas using `.to_pandas()` integer columns with null values get converted to float instead of using pandas nullable types.

If the column was created with pandas first it is correctly preserved (I guess it's using stored metadata for this).

As currently there is support for nullable types in pandas, just as in Arrow, it would be great to use these types when dealing with columns with null values.

If you are reticent to change this behavior, a param would be nice too (e.g. `to_pandas(use_nullable_types: True)`).

 


> to_pandas() converts to float instead of using pandas nullable types
> --------------------------------------------------------------------
>
>                 Key: ARROW-14004
>                 URL: https://issues.apache.org/jira/browse/ARROW-14004
>             Project: Apache Arrow
>          Issue Type: Bug
>            Reporter: Miguel Cantón Cortés
>            Priority: Major
>         Attachments: image.png
>
>
> We've noticed that when converting an Arrow Table to pandas using `.to_pandas()` integer columns with null values get converted to float instead of using pandas nullable types.
> If the column was created with pandas first it is correctly preserved (I guess it's using stored metadata for this).
> I've attached a screenshot showing this behavior.
> As currently there is support for nullable types in pandas, just as in Arrow, it would be great to use these types when dealing with columns with null values.
> If you are reticent to change this behavior, a param would be nice too (e.g. `to_pandas(use_nullable_types: True)`).
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)