jorisvandenbossche commented on PR #38321:
URL: https://github.com/apache/arrow/pull/38321#issuecomment-1767945494

   So it seems that pandas doesn't preserve the unit in the DatetimeArray 
constructor:
   
   ```
   In [4]: arr = np.array([1, 2, 3], dtype="datetime64[s]")
   
   In [5]: dtype = pd.DatetimeTZDtype("s", tz="Europe/Brussels")
   
   In [6]: pd.arrays.DatetimeArray(arr, dtype)
   Out[6]: 
   <DatetimeArray>
   ['1970-01-01 01:00:01+01:00', '1970-01-01 01:00:02+01:00',
    '1970-01-01 01:00:03+01:00']
   Length: 3, dtype: datetime64[ns, Europe/Brussels]
   ```
   
   This seems fixed on the last pandas release 2.1, so will have to keep the 
older code using internals for the older pandas versions.


-- 
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