You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Bryan Cutler (Jira)" <ji...@apache.org> on 2019/09/21 17:01:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16935089#comment-16935089 ]
Bryan Cutler commented on ARROW-6652:
-------------------------------------
[~wesm] or [~apitrou] would you be able to take a look at this?
> [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
> 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)