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

Function test_v2_set_chunksize

python/pyarrow/tests/test_feather.py:640–651  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

638
639@pytest.mark.pandas
640def test_v2_set_chunksize():
641 df = pd.DataFrame({'A': np.arange(1000)})
642 table = pa.table(df)
643
644 buf = io.BytesIO()
645 write_feather(table, buf, chunksize=250, version=2)
646
647 result = buf.getvalue()
648
649 ipc_file = pa.ipc.open_file(pa.BufferReader(result))
650 assert ipc_file.num_record_batches == 4
651 assert len(ipc_file.get_batch(0)) == 250
652
653
654@pytest.mark.pandas

Callers

nothing calls this directly

Calls 3

write_featherFunction · 0.90
lenFunction · 0.85
BufferReaderMethod · 0.80

Tested by

no test coverage detected