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:225–237  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

223
224@pytest.mark.pandas
225def test_empty_table_roundtrip():
226 df = alltypes_sample(size=10)
227
228 # Create a non-empty table to infer the types correctly, then slice to 0
229 table = pa.Table.from_pandas(df)
230 table = pa.Table.from_arrays(
231 [col.chunk(0)[:0] for col in table.itercolumns()],
232 names=table.schema.names)
233
234 assert table.schema.field('null').type == pa.null()
235 assert table.schema.field('null_list').type == pa.list_(pa.null())
236 _check_roundtrip(
237 table, version='2.6')
238
239
240@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