alex-anast opened a new pull request, #49843:
URL: https://github.com/apache/arrow/pull/49843

   ### Rationale for this change
   
   NumPy's `datetime64` type does not support timezones. When converting a 
timezone-aware Arrow timestamp array to NumPy via `to_numpy()`, the timezone 
information is silently dropped. This behaviour is expected but undocumented, 
which can surprise users (see #45644).
   
   ### What changes are included in this PR?
   
   Adds a "Timezone-aware Timestamps" subsection to 
`docs/source/python/numpy.rst` that:
   
   - Explains the timezone loss when calling `to_numpy()` on tz-aware timestamp 
arrays
   - Shows a code example demonstrating the behavior
   - Documents two alternatives: `to_pandas()` for tz-aware Series, and 
`to_pylist()` for Python `datetime` objects with `tzinfo`
   
   ### Are these changes tested?
   
   Documentation-only change. All code examples were verified against pyarrow 
24.0.0 and `sphinx-lint` passes clean.
   
   ### Are there any user-facing changes?
   
   No behaviour changes. This adds documentation for existing behaviour.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to