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

Function tables

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

Source from the content-addressed store, hash-verified

431
432@st.composite
433def tables(draw, type, rows=None, max_fields=None):
434 if isinstance(rows, st.SearchStrategy):
435 rows = draw(rows)
436 elif rows is None:
437 rows = draw(_default_array_sizes)
438 elif not isinstance(rows, int):
439 raise TypeError('Rows must be an integer')
440
441 schema = draw(schemas(type, max_fields=max_fields))
442 children = [draw(arrays(field.type, size=rows)) for field in schema]
443 return pa.Table.from_arrays(children, schema=schema)
444
445
446all_arrays = arrays(all_types)

Calls 3

schemasFunction · 0.85
arraysFunction · 0.85
TypeErrorFunction · 0.50