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

Function test_empty_table_roundtrip

python/pyarrow/tests/parquet/test_basic.py:208–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206
207@pytest.mark.pandas
208def test_empty_table_roundtrip():
209 df = alltypes_sample(size=10)
210
211 # Create a non-empty table to infer the types correctly, then slice to 0
212 table = pa.Table.from_pandas(df)
213 table = pa.Table.from_arrays(
214 [col.chunk(0)[:0] for col in table.itercolumns()],
215 names=table.schema.names)
216
217 assert table.schema.field('null').type == pa.null()
218 assert table.schema.field('null_list').type == pa.list_(pa.null())
219 _check_roundtrip(
220 table, version='2.6')
221
222
223@pytest.mark.pandas

Callers

nothing calls this directly

Calls 3

alltypes_sampleFunction · 0.90
_check_roundtripFunction · 0.90
fieldMethod · 0.45

Tested by

no test coverage detected