You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Jesper Jaxing (Jira)" <ji...@apache.org> on 2021/01/28 16:00:00 UTC

[jira] [Created] (ARROW-11416) [Python] table.to_pandas converts int32 to float64 if column is None

Jesper Jaxing created ARROW-11416:
-------------------------------------

             Summary: [Python] table.to_pandas converts int32 to float64 if column is None
                 Key: ARROW-11416
                 URL: https://issues.apache.org/jira/browse/ARROW-11416
             Project: Apache Arrow
          Issue Type: Bug
            Reporter: Jesper Jaxing


table.to_pandas converts int32 to float64 if column is None.

To recreate:

import pyarrow as pa

schema = pa.schema([pa.field('a', pa.int32())])

a = [None, None, None]

array = pa.array(a, type=pa.int32())

table = pa.Table.from_arrays([array], schema=schema)

df = table.to_pandas()

df.dtypes
>> a float64



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