Skip to content

[Doc][Python] Timestamp with tz loses its time zone after to_numpy #45644

@sharkdtu

Description

@sharkdtu

Describe the bug, including details regarding any error messages, version, and platform.

Timestamptz type loses its time zone after to_numpy.

Versions / Dependencies

In [44]: pa.__version__
Out[44]: '19.0.1'

Reproduction script

In [39]: import pyarrow as pa

In [40]: x = pa.array([1735689600, 1735689600, 1735689600], type=pa.timestamp("s", tz='UTC'))

In [41]: print(x.type)
timestamp[s, tz=UTC]

In [42]: y = x.to_numpy()

In [43]: print(y.dtype)
datetime64[s]

Component(s)

Python

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions