File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
tests/nested_pandas/nestedframe Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 55import pyarrow as pa
66import pytest
77from nested_pandas import read_parquet
8+ from nested_pandas .datasets import generate_data
89from pandas .testing import assert_frame_equal
910
1011
@@ -124,8 +125,12 @@ def test_to_parquet():
124125
125126def test_pandas_read_parquet ():
126127 """Test that pandas can read our serialized files"""
127- # Load in the example file
128- df = pd .read_parquet ("tests/test_data/nested.parquet" )
129128
130- # Check the columns
131- assert df .columns .tolist () == ["a" , "flux" , "nested" , "lincc" ]
129+ nf = generate_data (10 , 100 , seed = 1 )
130+ with tempfile .TemporaryDirectory () as tmpdir :
131+ nf .to_parquet (os .path .join (tmpdir , "nested_for_pd.parquet" ))
132+ # Load in the example file
133+ df = pd .read_parquet (os .path .join (tmpdir , "nested_for_pd.parquet" ))
134+
135+ # Check the columns
136+ assert df .columns .tolist () == ["a" , "b" , "nested" ]
You can’t perform that action at this time.
0 commit comments