You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Doc][Python] Timestamp with tz loses its time zone after to_numpy #45644
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]
changed the title [-][Python] Timestamptz type loses its time zone after map transforming.[/-][+][Python] Timestamp with tz loses its time zone after `to_numpy`[/+]on Feb 28, 2025
changed the title [-][Python] Timestamp with tz loses its time zone after `to_numpy`[/-][+][Doc][Python] Timestamp with tz loses its time zone after `to_numpy`[/+]on Mar 10, 2025
Hello @AlenkaF
I’d like to work on documenting the timezone behavior when converting PyArrow timestamp arrays to NumPy.
I plan to add a section to the Python NumPy documentation explaining the loss of timezone info and the recommended alternatives.
Activity
[-][Python] Timestamptz type loses its time zone after map transforming.[/-][+][Python] Timestamp with tz loses its time zone after `to_numpy`[/+]AlenkaF commentedon Mar 3, 2025
This behaviour is expected as NumPy datetimes are not timezone aware, see https://numpy.org/devdocs/reference/arrays.datetime.html#datetimes-and-timedeltas.
You can convert pyarrow tz-aware timestamp array to
I will keep this issue open as this needs to be documented in https://arrow.apache.org/docs/python/numpy.html.
Also connected and need to go into the docs: #41162.
[-][Python] Timestamp with tz loses its time zone after `to_numpy`[/-][+][Doc][Python] Timestamp with tz loses its time zone after `to_numpy`[/+]DOC: clarify that Array.to_numpy() drops timezone for timestamp arrays (
Bhupendra-glitch commentedon Jan 1, 2026
Hello @AlenkaF
I’d like to work on documenting the timezone behavior when converting PyArrow timestamp arrays to NumPy.
I plan to add a section to the Python NumPy documentation explaining the loss of timezone info and the recommended alternatives.
alex-anast commentedon Apr 22, 2026
Hi @AlenkaF I've opened up a PR for this. Could you please take a look? 🙏
apacheGH-45644: [Doc][Python] Fix doctest failures and add nested typ…
apacheGH-45644: [Doc][Python] Fix doctest failures and add nested typ…
apacheGH-45644: [Doc][Python] Replace doctest +SKIP with minimal dire…
apacheGH-45644: [Doc][Python] Document timezone-aware NumPy object co…
GH-45644: [Doc][Python] Document timezone loss when converting timest…
apacheGH-45644: [Doc][Python] Document timezone loss when converting …