jorisvandenbossche commented on code in PR #14448:
URL: https://github.com/apache/arrow/pull/14448#discussion_r999368101
##########
python/pyarrow/tests/test_pandas.py:
##########
@@ -4472,6 +4472,23 @@ def test_timestamp_as_object_non_nanosecond(resolution,
tz, dt):
assert result[0] == expected
+def test_timestamp_as_object_pytz_offset():
+ # ARROW-16547 to_pandas with timestamp_as_object=True and FixedOffset
+ pytz = pytest.importorskip("pytz")
+ import datetime
+ timezone = pytz.FixedOffset(120)
+ dt = timezone.localize(datetime.datetime(2022, 5, 12, 16, 57))
+
+ timestamps = pa.array([dt])
+ names = ["timestamp_col"]
+ table = pa.Table.from_arrays([timestamps], names=names)
Review Comment:
```suggestion
table = pa.table({"timestamp_col": pa.array([dt])})
```
The existing code is perfectly fine as well, we can just use this more
succinct way in the tests to keep them more readable
--
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]