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:4951–4960  ·  view source on GitHub ↗
(tempdir)

Source from the content-addressed store, hash-verified

4949
4950@pytest.mark.parquet
4951def test_timestamp_as_object_parquet(tempdir):
4952 # Timestamps can be stored as Parquet and reloaded into Pandas with no loss
4953 # of information if the timestamp_as_object option is True.
4954 df = make_df_with_timestamps()
4955 table = pa.Table.from_pandas(df)
4956 filename = tempdir / "timestamps_from_pandas.parquet"
4957 pq.write_table(table, filename)
4958 result = pq.read_table(filename)
4959 df2 = result.to_pandas(timestamp_as_object=True)
4960 tm.assert_frame_equal(df, df2)
4961
4962
4963def 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