shashbha14 opened a new pull request, #49238: URL: https://github.com/apache/arrow/pull/49238
Fixes #49222 When you create a Table from a dict that has pandas Timedelta objects made with `Timestamp.replace()`, the values were getting lost and showing up as 0:00:00 instead of the actual duration. The problem was that `from_pydict` was treating lists of pandas Timedelta/Timestamp as plain Python lists, so it wasn't using the pandas-aware conversion path that knows how to handle these types correctly. I fixed it by detecting when a list contains pandas temporals and wrapping it in a pandas Series before conversion. That way `pa.array()` uses the pandas conversion logic and preserves the values. Added a test that reproduces the exact issue from the bug report. CI should verify everything works. Note: I couldn't run the tests locally because my C++ build is currently broken from unrelated work, but this is a small Python-only change so CI should cover it. -- 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]
