Skip to content

Commit 1c23076

Browse files
authored
apacheGH-39914 better testing based on PR feedback
1 parent cb87068 commit 1c23076

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎python/pyarrow/tests/test_pandas.py‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import gc
1919
import decimal
20-
import io
2120
import json
2221
import multiprocessing as mp
2322
import sys
@@ -4430,10 +4429,8 @@ def test_to_pandas_extension_dtypes_mapping_complex_type():
44304429
).astype({"foo": pd_type})
44314430

44324431
# Round trip df0 into df1
4433-
with io.BytesIO() as stream:
4434-
df0.to_parquet(stream, schema=schema)
4435-
stream.seek(0)
4436-
df1 = pd.read_parquet(stream, dtype_backend="pyarrow")
4432+
table = pa.Table.from_pandas(df0, schema=schema)
4433+
df1 = table.to_pandas(types_mapper=pd.ArrowDtype)
44374434
pd.testing.assert_frame_equal(df0, df1)
44384435

44394436

0 commit comments

Comments
 (0)