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

Function test_v2_set_chunksize

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

Source from the content-addressed store, hash-verified

631
632@pytest.mark.pandas
633def test_v2_set_chunksize():
634 df = pd.DataFrame({'A': np.arange(1000)})
635 table = pa.table(df)
636
637 buf = io.BytesIO()
638 write_feather(table, buf, chunksize=250, version=2)
639
640 result = buf.getvalue()
641
642 ipc_file = pa.ipc.open_file(pa.BufferReader(result))
643 assert ipc_file.num_record_batches == 4
644 assert len(ipc_file.get_batch(0)) == 250
645
646
647@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