[
https://issues.apache.org/jira/browse/ARROW-6652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16935111#comment-16935111
]
Joris Van den Bossche commented on ARROW-6652:
----------------------------------------------
Quickly did a PR (https://github.com/apache/arrow/pull/5462), thanks for the
catch [~bryanc] !
> [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
> Labels: pull-request-available
> Fix For: 0.15.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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)