Skip to content

Commit

Permalink
add repro case?
Browse files Browse the repository at this point in the history
  • Loading branch information
emfdavid committed Dec 19, 2024
1 parent 013798e commit 9049b3c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/test_read_parquet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

def test_read_parquet_td(tmp_path):
import pandas as pd
import numpy as np


df = pd.DataFrame(
data=dict(
ints=np.linspace(1,25, num=25, dtype="int64"),
floats=np.linspace(1,25, num=25, dtype="float64"),
dates=pd.date_range("2024-01-01T00", "2024-01-02T00", freq="h"),
deltas=pd.timedelta_range(start="1 h", end="25 h", freq="h"),
)
)

fpath = tmp_path / "fixture.parquet"
df.to_parquet(fpath)

result = pd.read_parquet(fpath)

pd.testing.assert_frame_equal(result, df)




0 comments on commit 9049b3c

Please sign in to comment.