phemmer opened a new issue, #49222:
URL: https://github.com/apache/arrow/issues/49222

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   When I try to create a `Table` containing a pandas `Timedelta` that was 
built using `Timestamp.replace`, the data is lost and reset to 0.
   
   For example:
   ```python
   import pandas as pd
   import pyarrow as pa
   
   now = pd.Timestamp("2022-03-03 10:00:00", tz='America/New_York')
   start_of_day = now.replace(hour=0, minute=0, second=0, microsecond=0, 
nanosecond=0)
   data = {'delta': [now - start_of_day]}
   data2 = pa.Table.from_pydict(data)
   print(f"data: {data['delta'][0]}")
   print(f"data2: {data2['delta'][0]}")
   ```
   
   Output:
   ```
   data: 0 days 10:00:00
   data2: 0:00:00
   ```
   
   The `data2` line should show 10 hours, not 0 hours.
   
   This only happens if the delta was built using a `Timestamp` that was 
created using `replace` on another `Timestamp`.
   
   ### Component(s)
   
   Python


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