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

Function test_timestamp_as_object_parquet

python/pyarrow/tests/test_pandas.py:5028–5037  ·  view source on GitHub ↗
(tempdir)

Source from the content-addressed store, hash-verified

5026
5027@pytest.mark.parquet
5028def test_timestamp_as_object_parquet(tempdir):
5029 # Timestamps can be stored as Parquet and reloaded into Pandas with no loss
5030 # of information if the timestamp_as_object option is True.
5031 df = make_df_with_timestamps()
5032 table = pa.Table.from_pandas(df)
5033 filename = tempdir / "timestamps_from_pandas.parquet"
5034 pq.write_table(table, filename)
5035 result = pq.read_table(filename)
5036 df2 = result.to_pandas(timestamp_as_object=True)
5037 tm.assert_frame_equal(df, df2)
5038
5039
5040def test_timestamp_as_object_out_of_range():

Callers

nothing calls this directly

Calls 3

make_df_with_timestampsFunction · 0.85
write_tableMethod · 0.45
read_tableMethod · 0.45

Tested by

no test coverage detected