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

Function test_table_from_lists

python/pyarrow/tests/test_table.py:1519–1535  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1517
1518
1519def test_table_from_lists():
1520 data = [
1521 list(range(5)),
1522 [-10, -5, 0, 5, 10]
1523 ]
1524
1525 result = pa.table(data, names=['a', 'b'])
1526 expected = pa.Table.from_arrays(data, names=['a', 'b'])
1527 assert result.equals(expected)
1528
1529 schema = pa.schema([
1530 pa.field('a', pa.uint16()),
1531 pa.field('b', pa.int64())
1532 ])
1533 result = pa.table(data, schema=schema)
1534 expected = pa.Table.from_arrays(data, schema=schema)
1535 assert result.equals(expected)
1536
1537
1538def test_table_pickle(pickle_module):

Callers

nothing calls this directly

Calls 4

listFunction · 0.85
equalsMethod · 0.80
schemaMethod · 0.45
fieldMethod · 0.45

Tested by

no test coverage detected