You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2019/09/21 17:43:00 UTC

[jira] [Assigned] (ARROW-6652) [Python] to_pandas conversion removes timezone from type

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

Joris Van den Bossche reassigned ARROW-6652:
--------------------------------------------

    Assignee: Joris Van den Bossche

> [Python] to_pandas conversion removes timezone from type
> --------------------------------------------------------
>
>                 Key: ARROW-6652
>                 URL: https://issues.apache.org/jira/browse/ARROW-6652
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Bryan Cutler
>            Assignee: Joris Van den Bossche
>            Priority: Critical
>             Fix For: 0.15.0
>
>
> Calling {{to_pandas}} on a {{pyarrow.Array}} with a timezone aware timestamp type, removes the timezone in the resulting {{pandas.Series}}.
> {code}
> >>> import pyarrow as pa
> >>> a = pa.array([1], type=pa.timestamp('us', tz='America/Los_Angeles'))
> >>> a.to_pandas()
> 0   1970-01-01 00:00:00.000001
> dtype: datetime64[ns]
> {code}
> Previous behavior from 0.14.1 of converting a {{pyarrow.Column}} {{to_pandas}} retained the timezone.
> {code}
> In [4]: import pyarrow as pa 
>    ...: a = pa.array([1], type=pa.timestamp('us', tz='America/Los_Angeles'))  
>    ...: c = pa.Column.from_array('ts', a) 
> In [5]: c.to_pandas()                                                                                                        
> Out[5]: 
> 0   1969-12-31 16:00:00.000001-08:00
> Name: ts, dtype: datetime64[ns, America/Los_Angeles]
> {code}



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