MCPcopy Create free account
hub / github.com/apache/arrow / test_timestamp_as_object_fixed_offset

Function test_timestamp_as_object_fixed_offset

python/pyarrow/tests/test_pandas.py:4997–5006  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4995
4996
4997def test_timestamp_as_object_fixed_offset():
4998 # ARROW-16547 to_pandas with timestamp_as_object=True and FixedOffset
4999 pytz = pytest.importorskip("pytz")
5000 import datetime
5001 timezone = pytz.FixedOffset(120)
5002 dt = timezone.localize(datetime.datetime(2022, 5, 12, 16, 57))
5003
5004 table = pa.table({"timestamp_col": pa.array([dt])})
5005 result = table.to_pandas(timestamp_as_object=True)
5006 assert pa.table(result) == table
5007
5008
5009@pytest.mark.processes

Callers

nothing calls this directly

Calls 2

datetimeMethod · 0.80
arrayMethod · 0.45

Tested by

no test coverage detected