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

Function tables

python/pyarrow/tests/strategies.py:453–463  ·  view source on GitHub ↗
(draw, type, rows=None, max_fields=None)

Source from the content-addressed store, hash-verified

451
452@st.composite
453def tables(draw, type, rows=None, max_fields=None):
454 if isinstance(rows, st.SearchStrategy):
455 rows = draw(rows)
456 elif rows is None:
457 rows = draw(_default_array_sizes)
458 elif not isinstance(rows, int):
459 raise TypeError('Rows must be an integer')
460
461 schema = draw(schemas(type, max_fields=max_fields))
462 children = [draw(arrays(field.type, size=rows)) for field in schema]
463 return pa.Table.from_arrays(children, schema=schema)
464
465
466all_arrays = arrays(all_types)

Calls 3

schemasFunction · 0.85
arraysFunction · 0.85
TypeErrorFunction · 0.50